From c0a5a7cbc09784b12a5e4e4336c04fcf9e12af99 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 Feb 2008 23:23:22 +0000 Subject: [PATCH] Fix: Regression avec menu auguria --- htdocs/lib/menubase.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/lib/menubase.class.php b/htdocs/lib/menubase.class.php index f93ae5e9585..a864fbd3419 100644 --- a/htdocs/lib/menubase.class.php +++ b/htdocs/lib/menubase.class.php @@ -421,6 +421,7 @@ class Menubase { global $user, $conf, $user; + include_once(DOL_DOCUMENT_ROOT.'/lib/admin.lib.php'); // Because later some eval try to run dynamic call to dolibarr_get_const $constraint = true; $sql = "SELECT c.rowid, c.action, mc.user"; @@ -431,12 +432,12 @@ class Menubase if ($result) { //echo $sql; - $num = $this->db->num_rows(); + $num = $this->db->num_rows($result); $i = 0; while (($i < $num) && $constraint == true) { $obj = $this->db->fetch_object($result); - $strconstraint = "if(!(" . $obj->action . ")) { \$constraint = false;}"; + $strconstraint = "if(!(" . $obj->action . ")) { \$constraint = false; }"; eval ($strconstraint); $i++;