Changeset 11462 for extensions/set_plugins/set_plugins_class.php
- Timestamp:
- Jun 21, 2011, 1:54:46 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/set_plugins/set_plugins_class.php
r11386 r11462 1 1 <?php 2 2 /***************************************************************************/ 3 class set_plugins _controler{3 class set_plugins { 4 4 //============================================================================= 5 5 function set_plugins_admin_menu($menu) { … … 23 23 case 'plugins_list': 24 24 if(!isset($template)) return ; 25 set_plugins _controler::Affiche_set_plugins();25 set_plugins::Affiche_set_plugins(); 26 26 break; 27 27 case 'plugins': 28 28 if (!isset($page['tab'])) return; 29 29 if ($page['tab']!="installed") return ; 30 set_plugins _controler::Affiche_set_plugins();30 set_plugins::Affiche_set_plugins(); 31 31 break; 32 32 } … … 34 34 } 35 35 //============================================================================ 36 function cl_affiche_messages_admin() 37 { 36 function cl_affiche_messages_admin(){ 38 37 global $template,$page, $template, $pwg_loaded_plugins,$infos_message,$erreur_message,$infos_warning; 38 39 39 if ( (isset($_GET['page']) AND $_GET['page'] == 'plugins_list') ) { 40 if (!isset($page['infos'])) $page['infos']=array(); 40 41 if ($infos_message != "") { 41 42 array_push($page['infos'], $infos_message); 42 43 $infos_message=""; 43 } 44 45 } 46 if (count($page['infos']) != 0){ 47 $template->assign('infos', $page['infos']); 48 } 49 if (!isset($page['errors'])) $page['errors']=array(); 44 50 if ($erreur_message != "") { 45 51 array_push($page['errors'], $erreur_message); 46 52 $erreur_message=""; 47 } 53 } 54 if (count($page['errors']) != 0){ 55 $template->assign('errors', $page['errors']); 56 } 57 58 if (!isset($page['warnings'])) $page['warnings']=array(); 48 59 if ($infos_warning!= "") { 49 60 array_push($page['warnings'], $infos_warning); 50 61 $infos_warning= ""; 51 } 52 if (count($page['errors']) != 0){ 53 $template->assign('errors', $page['errors']); 54 } 55 if (count($page['infos']) != 0){ 56 $template->assign('infos', $page['infos']); 57 } 62 } 58 63 if (count($page['warnings']) != 0){ 59 64 $template->assign('warnings', $page['warnings']); … … 84 89 'nb' =>$nb 85 90 ); 86 // $infos_warning .="save_config" . set_plugins _controler::memo_var($conf['set_plugins'] );91 // $infos_warning .="save_config" . set_plugins::memo_var($conf['set_plugins'] ); 87 92 $conf['set_plugins']= (serialize($config)); 88 93 conf_update_param('set_plugins', $conf['set_plugins']); 89 94 90 95 91 96 } … … 101 106 } 102 107 //=================================================================== 103 108 function Affiche_set_plugins(){ 104 109 include_once(SET_PLUGINS_PATH."include/constants.php"); 105 110 include(SET_PLUGINS_PATH.'include/affiche.php'); … … 165 170 } 166 171 $nb=count($liste_plugins); 167 } 172 173 } 174 175 176 168 177 if(isset($result) && $result==true){ 169 178 $redirect_url = get_root_url().'admin.php?page='.$_GET['page']; 170 179 //$infos_message .="-----> Mise à jour : " . $nb."<br />"; 171 //$infos_message .="Liste Avant: " . set_plugins _controler::memo_var($liste);172 set_plugins _controler::save_config();180 //$infos_message .="Liste Avant: " . set_plugins::memo_var($liste); 181 set_plugins::save_config(); 173 182 174 183 $_POST['set']=""; … … 183 192 } 184 193 $template->set_filenames( 185 array( 'cl_plugin' => dirname(__FILE__).'/admin.tpl' )194 array( 'cl_plugin' => SET_PLUGINS_PATH_ABS.'template/admin.tpl' ) 186 195 ); 187 196 197 188 198 //=========================================================== 189 199 $header_1='<div id="titrePage"> … … 191 201 </div>'; 192 202 $bpplus=$header_1.$template->parse('cl_plugin', true); 203 193 204 $template-> assign('ADMIN_CONTENT',$bpplus); 194 205 $bpplus=$template->parse('plugins', true);
Note: See TracChangeset
for help on using the changeset viewer.