Changeset 10330 for extensions/Icons_Set
- Timestamp:
- Apr 12, 2011, 5:55:18 PM (13 years ago)
- Location:
- extensions/Icons_Set
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Icons_Set/admin.php
r10326 r10330 8 8 $page['infos'] = array(); 9 9 10 10 // +-------------------------------------------------------+ 11 // | envoi de la config | 12 // +-------------------------------------------------------+ 11 13 if (isset($_POST['envoi_config']) and $_POST['envoi_config']=='iconset') 12 14 { … … 49 51 load_conf_from_db(); 50 52 } 51 //////////////////////////////////////////////// 52 ////////[ liste les icones dispo ] ////////// 53 54 // +-------------------------------------------------------+ 55 // | liste les icones dispo | 56 // +-------------------------------------------------------+ 57 53 58 // RQ : un set d'icone = chemin vers le *.conf.php ; on associe (ou pas) un fichier *.conf.php par thème 54 //////////////////////////////////////////////// 59 55 60 function get_list_iconconf_path ($dir) { 56 61 static $list_iconconf_path=array(); … … 87 92 return $list_iconconf_path; 88 93 } 89 94 // +-------------------------------------------------------+ 95 // | Vérifie l'intégrité de la config | 96 // +-------------------------------------------------------+ 90 97 function check_config() 91 98 { … … 159 166 if (!empty($info_deleted_icon)) { array_push($page['infos'], l10n('iconset_info_deleted_icon').$info_deleted_icon ); } 160 167 } 161 check_config(); 162 load_conf_from_db(); 168 169 // +-------------------------------------------------------+ 170 // | début réel | 171 // +-------------------------------------------------------+ 172 173 if (!isset($_POST['envoi_config']))// on économise du temps 174 { 175 check_config(); 176 load_conf_from_db(); 177 } 163 178 $conf_iconset = @unserialize($conf['iconset']);//pwg_db_real_escape_string(serialize($conf_iconset)) 164 179 $conf_themes=$conf_iconset['themes']; … … 168 183 $themes->sort_fs_themes(); 169 184 $all_themes=array(); 185 186 // affichage des themes 170 187 foreach ($conf_themes as $theme_id => $iconset) 171 188 { … … 187 204 ); 188 205 206 // affichage des icônes 189 207 foreach ($conf_icons as $iconset) 190 208 { 191 include_once('icons/'.$iconset);209 @include_once('icons/'.$iconset); 192 210 $all_icons[]=array( 193 211 'path'=>$iconset, -
extensions/Icons_Set/main.inc.php
r10297 r10330 26 26 return $menu; 27 27 } 28 add_event_handler('loc_after_page_header', 'load_set'); 29 function load_set() 30 { 31 global $template, $user, $conf; 32 $conf_iconset = @unserialize($conf['iconset']);//pwg_db_real_escape_string(serialize($conf_iconset)) 33 $conf_themes=$conf_iconset['themes']; 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']]) ) 36 { 37 include ICONS_PATH.$conf_themes[$user['theme']]; 38 $template->func_combine_css(array( 39 'path' => $iconsetconf['css_file'], 40 'order' => 100, 41 ), 42 $smarty 43 ); 44 45 } 28 46 47 48 } 29 49 ?>
Note: See TracChangeset
for help on using the changeset viewer.