Changeset 10334
- Timestamp:
- Apr 12, 2011, 6:51:57 PM (13 years ago)
- Location:
- extensions/Icons_Set
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Icons_Set/admin.php
r10330 r10334 3 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 4 4 5 global $template, $conf, $user ;5 global $template, $conf, $user, $page; 6 6 7 7 load_language('plugin.lang', ICONSET_PATH); 8 $page['infos'] = array(); 8 //$page['infos'] = array(); 9 //$page['errors'] = array(); 9 10 10 11 // +-------------------------------------------------------+ … … 47 48 LIMIT 1'; 48 49 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 ); } 50 51 if (!empty($update_ok)) { array_push($page['infos'], l10n('iconset_update_ok').$update_ok ); } 51 52 load_conf_from_db(); … … 123 124 continue; 124 125 } 125 if (! array_key_exists($fs_theme['id'],$conf_themes)) // theme ajouté126 if (!is_array($conf_themes)) // theme ajouté 126 127 { 127 128 $info_new_theme.=$theme_id.'<br>'; 128 129 $conf_themes[$theme_id]=''; // RAZ 129 130 } 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 } 130 136 if (!empty($conf_themes[$theme_id]) and !in_array($conf_themes[$theme_id], $all_icons)) // association thème/icon supprimée 131 137 { … … 145 151 foreach ($all_icons as $iconset) // icones ajoutées 146 152 { 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 148 161 { 149 162 $info_new_icon.=$iconset.'<br>'; -
extensions/Icons_Set/main.inc.php
r10330 r10334 33 33 $conf_themes=$conf_iconset['themes']; 34 34 $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']]) ) 36 36 { 37 37 include ICONS_PATH.$conf_themes[$user['theme']];
Note: See TracChangeset
for help on using the changeset viewer.