Fix: regex not complete
This commit is contained in:
parent
281cd49f32
commit
4996a4b217
@ -535,7 +535,7 @@ class Menubase
|
||||
if ($menu['perms'])
|
||||
{
|
||||
$tmpcond=$menu['perms'];
|
||||
if ($leftmenu == 'all') $tmpcond=preg_replace('/\$leftmenu\s*==\s*["\'a-zA-Z]+/','1==1',$tmpcond); // Force part of condition to true
|
||||
if ($leftmenu == 'all') $tmpcond=preg_replace('/\$leftmenu\s*==\s*["\'a-zA-Z_]+/','1==1',$tmpcond); // Force part of condition to true
|
||||
$perms = verifCond($tmpcond);
|
||||
//print "verifCond rowid=".$menu['rowid']." ".$tmpcond.":".$perms."<br>\n";
|
||||
}
|
||||
@ -545,7 +545,7 @@ class Menubase
|
||||
if ($menu['enabled'])
|
||||
{
|
||||
$tmpcond=$menu['enabled'];
|
||||
if ($leftmenu == 'all') $tmpcond=preg_replace('/\$leftmenu\s*==\s*["\'a-zA-Z]+/','1==1',$tmpcond); // Force part of condition to true
|
||||
if ($leftmenu == 'all') $tmpcond=preg_replace('/\$leftmenu\s*==\s*["\'a-zA-Z_]+/','1==1',$tmpcond); // Force part of condition to true
|
||||
$enabled = verifCond($tmpcond);
|
||||
if ($conf->use_javascript_ajax && ! empty($conf->global->MAIN_MENU_USE_JQUERY_ACCORDION) && preg_match('/^\$leftmenu/',$menu['enabled'])) $enabled=1;
|
||||
//print "verifCond rowid=".$menu['rowid']." ".$tmpcond.":".$enabled."<br>\n";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user