Changeset 10334


Ignore:
Timestamp:
Apr 12, 2011, 6:51:57 PM (13 years ago)
Author:
flop25
Message:

traduction EN and FR added
all seems good
todo : test tricky .conf.php

Location:
extensions/Icons_Set
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/Icons_Set/admin.php

    r10330 r10334  
    33if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    44
    5 global $template, $conf, $user;
     5global $template, $conf, $user, $page;
    66
    77load_language('plugin.lang', ICONSET_PATH);
    8 $page['infos'] = array();
     8//$page['infos'] = array();
     9//$page['errors'] = array();
    910
    1011// +-------------------------------------------------------+
     
    4748    LIMIT 1';
    4849  pwg_query($query);
    49         if (!empty($error_update)) {    array_push($page['infos'], l10n('iconset_error_update').$error_update );         }
     50        if (!empty($error_update)) {    array_push($page['errors'], l10n('iconset_error_update').$error_update );        }
    5051        if (!empty($update_ok)) {       array_push($page['infos'], l10n('iconset_update_ok').$update_ok );       }
    5152        load_conf_from_db();
     
    123124                        continue;
    124125                }
    125                 if (!array_key_exists($fs_theme['id'], $conf_themes)) // theme ajouté
     126                if (!is_array($conf_themes)) // theme ajouté
    126127                {
    127128                        $info_new_theme.=$theme_id.'<br>';
    128129                        $conf_themes[$theme_id]=''; // RAZ
    129130                }
     131                elseif (!array_key_exists($fs_theme['id'], $conf_themes)) // theme ajouté
     132                {
     133                        $info_new_theme.=$theme_id.'<br>';
     134                        $conf_themes[$theme_id]=''; // RAZ
     135                }
    130136                if (!empty($conf_themes[$theme_id]) and !in_array($conf_themes[$theme_id], $all_icons))  //  association thème/icon supprimée
    131137                {
     
    145151        foreach ($all_icons as $iconset) // icones ajoutées
    146152        {
    147                 if (!in_array($iconset, $conf_icons))
     153                if (is_array($conf_icons))
     154                {
     155                        if (!in_array($iconset, $conf_icons))
     156                        {
     157                                $info_new_icon.=$iconset.'<br>';
     158                        }
     159                }
     160                else
    148161                {
    149162                        $info_new_icon.=$iconset.'<br>';
  • extensions/Icons_Set/main.inc.php

    r10330 r10334  
    3333        $conf_themes=$conf_iconset['themes'];
    3434        $conf_icons=$conf_iconset['icons'];
    35         if (isset($user['theme']) and array_key_exists($user['theme'], $conf_themes) and !empty($conf_themes[$user['theme']]) and file_exists(ICONS_PATH.$conf_themes[$user['theme']]) )
     35        if (isset($user['theme']) and is_array($conf_themes) and array_key_exists($user['theme'], $conf_themes) and !empty($conf_themes[$user['theme']]) and file_exists(ICONS_PATH.$conf_themes[$user['theme']]) )
    3636        {
    3737                include ICONS_PATH.$conf_themes[$user['theme']];
Note: See TracChangeset for help on using the changeset viewer.