From ae361e4fe748c57d19c9c4901ae9dfd5065b7d33 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 1 May 2008 12:00:51 +0000 Subject: [PATCH] doxygen --- htdocs/core/menubase.class.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/htdocs/core/menubase.class.php b/htdocs/core/menubase.class.php index 5595ddd2802..5eecbe73daa 100644 --- a/htdocs/core/menubase.class.php +++ b/htdocs/core/menubase.class.php @@ -523,6 +523,8 @@ class Menubase /** * \brief Load tabMenu array * \param type_user 0=Internal,1=External,2=All + * \param mainmenu Value for mainmenu that defined top menu + * \param menu_handler Name of menu_handler used (auguria, eldy...) */ function menutopCharger($type_user, $mainmenu, $menu_handler) { @@ -615,16 +617,24 @@ class Menubase } +/** + * Replace eval function to add more security + * + * @param string $s + * @return int 1 + */ function dol_eval($s) { - // To get and return to caller - global $leftmenu, $leftmenuConstraint, $constraint, $rights, $user, $conf; + // Only global variables can be changed by eval function and returned to caller + global $langs, $user, $conf; + global $leftmenu, $leftmenuConstraint, $constraint, $rights; + + // \todo + // Warning. We must add code to exclude test if it contains = (affectation) that is not == (compare) //print $s."
\n"; eval($s); - // \todo - // Warning. We must add code to exclude test if it contains = (affectation) that is not == (compare) return 1; }