Removed old constant name for menu management.

This commit is contained in:
Laurent Destailleur 2011-02-13 14:05:53 +00:00
parent 3a0fb455a4
commit d3bb6e256d
2 changed files with 7 additions and 6 deletions

View File

@ -205,8 +205,8 @@ class Conf
//var_dump($this->modules); //var_dump($this->modules);
// Clean some variables // Clean some variables
if (empty($this->global->MAIN_MENU_BARRETOP)) $this->global->MAIN_MENU_BARRETOP="eldy_backoffice.php"; if (empty($this->global->MAIN_MENU_STANDARD)) $this->global->MAIN_MENU_STANDARD="eldy_backoffice.php";
if (empty($this->global->MAIN_MENUFRONT_BARRETOP)) $this->global->MAIN_MENUFRONT_BARRETOP="eldy_frontoffice.php"; if (empty($this->global->MAIN_MENUFRONT_STANDARD)) $this->global->MAIN_MENUFRONT_STANDARD="eldy_frontoffice.php";
if (empty($this->global->MAIN_MENU_SMARTPHONE)) $this->global->MAIN_MENU_SMARTPHONE="iphone_backoffice.php"; if (empty($this->global->MAIN_MENU_SMARTPHONE)) $this->global->MAIN_MENU_SMARTPHONE="iphone_backoffice.php";
if (empty($this->global->MAIN_MENUFRONT_SMARTPHONE)) $this->global->MAIN_MENUFRONT_SMARTPHONE="iphone_frontoffice.php"; if (empty($this->global->MAIN_MENUFRONT_SMARTPHONE)) $this->global->MAIN_MENUFRONT_SMARTPHONE="iphone_frontoffice.php";

View File

@ -127,8 +127,9 @@ class FormAdmin
* @param selected Preselected menu value * @param selected Preselected menu value
* @param htmlname Name of html select * @param htmlname Name of html select
* @param dirmenu Directory to scan * @param dirmenu Directory to scan
* @param moreattrib More attributes on html select tag
*/ */
function select_menu($selected='',$htmlname,$dirmenu) function select_menu($selected='', $htmlname, $dirmenu, $moreattrib='')
{ {
global $langs,$conf; global $langs,$conf;
@ -152,7 +153,7 @@ class FormAdmin
$prefix=''; $prefix='';
if (preg_match('/^eldy|^iphone/i',$file)) $prefix='0'; // 0=Recommanded, 1=Experimental, 2=Other if (preg_match('/^eldy|^iphone/i',$file)) $prefix='0'; // 0=Recommanded, 1=Experimental, 2=Other
else $prefix='2'; else $prefix='2';
if ($file == $selected) if ($file == $selected)
{ {
$menuarray[$prefix.'_'.$file]='<option value="'.$file.'" selected="selected">'.$filelib.'</option>'; $menuarray[$prefix.'_'.$file]='<option value="'.$file.'" selected="selected">'.$filelib.'</option>';
@ -170,7 +171,7 @@ class FormAdmin
ksort($menuarray); ksort($menuarray);
// Affichage liste deroulante des menus // Affichage liste deroulante des menus
print '<select class="flat" name="'.$htmlname.'">'; print '<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'"'.($moreattrib?' '.$moreattrib:'').'>';
$oldprefix=''; $oldprefix='';
foreach ($menuarray as $key => $val) foreach ($menuarray as $key => $val)
{ {
@ -224,7 +225,7 @@ class FormAdmin
if (preg_match('/^empty/i',$filelib)) continue; if (preg_match('/^empty/i',$filelib)) continue;
if (preg_match('/\.lib/i',$filelib)) continue; if (preg_match('/\.lib/i',$filelib)) continue;
if (empty($conf->global->MAIN_FEATURES_LEVEL) && in_array($file,$expdevmenu)) continue; if (empty($conf->global->MAIN_FEATURES_LEVEL) && in_array($file,$expdevmenu)) continue;
$menuarray[$filelib]=1; $menuarray[$filelib]=1;
} }
$menuarray['all']=1; $menuarray['all']=1;