From 9306360d3ce418c8bfae6d3947f8557515a76b4a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 19 Sep 2012 13:39:47 +0200 Subject: [PATCH] Remove warnings --- htdocs/admin/ihm.php | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 0db18adcf80..30b33e70db8 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -57,7 +57,6 @@ if ($action == 'update') dolibarr_set_const($db, "MAIN_MULTILANGS", $_POST["main_multilangs"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["main_disable_javascript"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_USE_PREVIEW_TABS", $_POST["main_use_preview_tabs"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", $_POST["MAIN_BUTTON_HIDE_UNAUTHORIZED"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_START_WEEK", $_POST["MAIN_START_WEEK"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_SHOW_LOGO", $_POST["MAIN_SHOW_LOGO"],'chaine',0,'',$conf->entity); @@ -74,7 +73,9 @@ if ($action == 'update') dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr($_POST["main_motd"]),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr($_POST["main_home"]),'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", $_POST["MAIN_HELP_DISABLELINK"],'chaine',0,'',0); // Param for all entities - dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", $_POST["MAIN_BUGTRACK_ENABLELINK"],'chaine',0,'',$conf->entity); + + // This one is not always defined + if (isset($_POST["MAIN_USE_PREVIEW_TABS"])) dolibarr_set_const($db, "MAIN_USE_PREVIEW_TABS", $_POST["MAIN_USE_PREVIEW_TABS"],'chaine',0,'',$conf->entity); $_SESSION["mainmenu"]=""; // Le gestionnaire de menu a pu changer @@ -187,7 +188,7 @@ if ($action == 'edit') // Edit { $var=!$var; print ''.$langs->trans("UsePreviewTabs").''; - print $form->selectyesno('main_use_preview_tabs',isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0,1); + print $form->selectyesno('MAIN_USE_PREVIEW_TABS',isset($conf->global->MAIN_USE_PREVIEW_TABS)?$conf->global->MAIN_USE_PREVIEW_TABS:0,1); print ''; print ' '; print ''; @@ -237,7 +238,7 @@ if ($action == 'edit') // Edit // Message on login page $var=!$var; print ''.$langs->trans("MessageLogin").''; - + $doleditor = new DolEditor('main_home', (isset($conf->global->MAIN_HOME)?$conf->global->MAIN_HOME:''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, 90); $doleditor->Create(); @@ -246,22 +247,12 @@ if ($action == 'edit') // Edit // Message of the day on home page $var=!$var; print ''.$langs->trans("MessageOfDay").''; - + $doleditor = new DolEditor('main_motd', (isset($conf->global->MAIN_MOTD)?$conf->global->MAIN_MOTD:''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, 90); $doleditor->Create(); print ''."\n"; - /* - // Show bugtrack link - $var=!$var; - print ''.$langs->trans("ShowBugTrackLink").''; - print $form->selectyesno('main_show_bugtrack_link',$conf->global->MAIN_BUGTRACK_ENABLELINK,1); - print ''; - print ' '; - print ''; - */ - print ''."\n"; @@ -401,15 +392,6 @@ else // Show else print ' '; print ''."\n"; - /* - // Show bugtrack link - $var=!$var; - print ''.$langs->trans("ShowBugTrackLink").''; - print yn($conf->global->MAIN_BUGTRACK_ENABLELINK).""; - print ' '; - print ""; - */ - print ''."\n"; print '
';