Removed specific code for auguria

This commit is contained in:
Laurent Destailleur 2010-09-29 08:45:45 +00:00
parent d29c8b2688
commit 6afe8962bf
2 changed files with 34 additions and 35 deletions

View File

@ -75,20 +75,14 @@ if (isset($_POST["action"]) && $_POST["action"] == 'update' && empty($_POST["can
$listofmenuhandler[preg_replace('/((_back|_front)office)?\.php/i','',$_POST["main_menufront_barretop"])]=1; $listofmenuhandler[preg_replace('/((_back|_front)office)?\.php/i','',$_POST["main_menufront_barretop"])]=1;
$listofmenuhandler[preg_replace('/((_back|_front)office)?\.php/i','',$_POST["main_menu_barreleft"])]=1; $listofmenuhandler[preg_replace('/((_back|_front)office)?\.php/i','',$_POST["main_menu_barreleft"])]=1;
$listofmenuhandler[preg_replace('/((_back|_front)office)?\.php/i','',$_POST["main_menufront_barreleft"])]=1; $listofmenuhandler[preg_replace('/((_back|_front)office)?\.php/i','',$_POST["main_menufront_barreleft"])]=1;
$listofmenuhandler[preg_replace('/((_back|_front)office)?\.php/i','',$_POST["main_menu_smartphone"])]=1; if (isset($_POST["main_menu_smartphone"])) $listofmenuhandler[preg_replace('/((_back|_front)office)?\.php/i','',$_POST["main_menu_smartphone"])]=1;
$listofmenuhandler[preg_replace('/((_back|_front)office)?\.php/i','',$_POST["main_menufront_smartphone"])]=1; if (isset($_POST["main_menufront_smartphone"])) $listofmenuhandler[preg_replace('/((_back|_front)office)?\.php/i','',$_POST["main_menufront_smartphone"])]=1;
// Initialize menu handlers
foreach ($listofmenuhandler as $key => $val) foreach ($listofmenuhandler as $key => $val)
{ {
$dir = DOL_DOCUMENT_ROOT."/includes/menus/"; $dir = DOL_DOCUMENT_ROOT."/includes/menus/";
if ($key == 'auguria')
{
// Load sql init_menu_base.sql file
$file='init_menu_base.sql';
$result=run_sql($dir.$file,1,'',1,$key);
}
else
{
// Load sql init_menu_handler.sql file // Load sql init_menu_handler.sql file
$file='init_menu_'.$key.'.sql'; $file='init_menu_'.$key.'.sql';
if (file_exists($dir.$file)) if (file_exists($dir.$file))
@ -96,7 +90,6 @@ if (isset($_POST["action"]) && $_POST["action"] == 'update' && empty($_POST["can
$result=run_sql($dir.$file,1,'',1,$key); $result=run_sql($dir.$file,1,'',1,$key);
} }
} }
}
// We make a header redirect because we need to change menu NOW. // We make a header redirect because we need to change menu NOW.
header("Location: ".$_SERVER["PHP_SELF"]); header("Location: ".$_SERVER["PHP_SELF"]);
@ -179,6 +172,8 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit')
print '</tr>'; print '</tr>';
// Menu smartphone // Menu smartphone
if ($conf->global->MAIN_FEATURES_LEVEL >= 1)
{
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMenuSmartphoneManager").'</td>'; print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMenuSmartphoneManager").'</td>';
print '<td>'; print '<td>';
@ -188,6 +183,7 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit')
print $htmladmin->select_menu($conf->global->MAIN_MENUFRONT_SMARTPHONE,'main_menufront_smartphone',$dirsmartphone); print $htmladmin->select_menu($conf->global->MAIN_MENUFRONT_SMARTPHONE,'main_menufront_smartphone',$dirsmartphone);
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
}
print '</table>'; print '</table>';
@ -239,6 +235,8 @@ else
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
if ($conf->global->MAIN_FEATURES_LEVEL >= 1)
{
$var=!$var; $var=!$var;
print '<tr '.$bc[$var].'>'; print '<tr '.$bc[$var].'>';
print '<td>'.$langs->trans("DefaultMenuSmartphoneManager").'</td>'; print '<td>'.$langs->trans("DefaultMenuSmartphoneManager").'</td>';
@ -251,6 +249,7 @@ else
print $filelib; print $filelib;
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
}
print '</table>'; print '</table>';
} }