diff --git a/htdocs/core/class/infobox.class.php b/htdocs/core/class/infobox.class.php index cdc6589b126..6c251dd1378 100644 --- a/htdocs/core/class/infobox.class.php +++ b/htdocs/core/class/infobox.class.php @@ -36,39 +36,44 @@ class InfoBox public static function getListOfPagesForBoxes() { global $conf; - - if($conf->global->MAIN_FEATURES_LEVEL < 2) + + if (empty($conf->global->MAIN_FEATURES_LEVEL) || $conf->global->MAIN_FEATURES_LEVEL < 2) + { return array(0 => 'Home'); + } else - { - return array(0 => 'Home', - 1 => 'userhome', - 2 => 'membersindex', - 3 => 'thirdpartiesindex', - 4 => 'productindex', - 5 => 'productindex', - 6 => 'mrpindex', - 7 => 'commercialindex', - 8 => 'projectsindex', - 9 => 'invoiceindex', - 10 => 'hrmindex', - 11 => 'ticketsindex', - 12 => 'stockindex', - 13 => 'sendingindex', - 14 => 'receptionindex', - 15 => 'activityindex', - 16 => 'proposalindex', - 17 => 'ordersindex', - 18 => 'orderssuppliersindex', - 19 => 'contractindex', - 20 => 'interventionindex', - 21 => 'suppliersproposalsindex', - 22 => 'donationindex', - 23 => 'specialexpensesindex', - 24 => 'expensereportindex', - 25 => 'mailingindex', - 26 => 'opensurveyindex'); - } + { + return array( + 0 => 'Home', + 1 => 'userhome', + 2 => 'membersindex', + 3 => 'thirdpartiesindex', + 4 => 'productindex', + 5 => 'productindex', + 6 => 'mrpindex', + 7 => 'commercialindex', + 8 => 'projectsindex', + 9 => 'invoiceindex', + 10 => 'hrmindex', + 11 => 'ticketsindex', + 12 => 'stockindex', + 13 => 'sendingindex', + 14 => 'receptionindex', + 15 => 'activityindex', + 16 => 'proposalindex', + 17 => 'ordersindex', + 18 => 'orderssuppliersindex', + 19 => 'contractindex', + 20 => 'interventionindex', + 21 => 'suppliersproposalsindex', + 22 => 'donationindex', + 23 => 'specialexpensesindex', + 24 => 'expensereportindex', + 25 => 'mailingindex', + 26 => 'opensurveyindex', + 27 => 'accountancyindex' + ); + } } /**