Changeset 9530 for extensions/adult_content/class.inc.php
- Timestamp:
- Mar 4, 2011, 5:57:52 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/adult_content/class.inc.php
r6940 r9530 124 124 ///////////////////////[début du plug]//////////////////// 125 125 $this->loading_lang(); 126 global $user, $conf, $page; 127 global $template; 128 126 global $user, $conf, $page, $template; 129 127 $menu = & $menu_ref_arr[0]; 130 131 $template->assign(132 133 134 128 $conf_plugin = explode("," , $conf['ad_c_plugin']); 129 $template->assign( 130 array( 131 'AC_NAME' => AC_NAME 132 )); 135 133 136 134 137 135 //include($this->var_template()); 138 if (is_a_guest() )136 if (is_a_guest() and $conf_plugin[0]=='true') 139 137 { 140 138 … … 181 179 ///////////////////////[FIN fermer/ouvert]//////////////////// 182 180 }//fin if guest 181 elseif (is_a_guest() and $conf_plugin[0]!='true') 182 { 183 $menu->hide_block('mbAdultContent'); 184 } 183 185 elseif ($user['username'] == '18') 184 186 { … … 244 246 )); 245 247 $menu = & $menu_ref_arr[0]; 246 $block = $menu->get_block( 'mbAdultContent' ); 247 $block->set_title(l10n('ac_title_choose')); 248 $block->template = $this->get_template('choose.tpl'); 248 if (($block = $menu->get_block( 'mbAdultContent' )) != null) { 249 $block->set_title(l10n('ac_title_choose')); 250 $block->template = $this->get_template('choose.tpl'); 251 } 249 252 250 253 } … … 279 282 )); 280 283 $menu = & $menu_ref_arr[0]; 281 $block = $menu->get_block( 'mbAdultContent' ); 282 $block->set_title(l10n('ac_title_menu_statut')); 283 $block->template = $this->get_template('choose.tpl'); 284 if (($block = $menu->get_block( 'mbAdultContent' )) != null) { 285 $block->set_title(l10n('ac_title_menu_statut')); 286 $block->template = $this->get_template('choose.tpl'); 287 } 284 288 285 289 }
Note: See TracChangeset
for help on using the changeset viewer.