printTopRightMenu trigger numeric never empty

maybe find something better
This commit is contained in:
BENKE Charlene 2018-04-13 02:42:19 +02:00 committed by GitHub
parent 39ebaf40ac
commit a7decb2173
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1493,10 +1493,13 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
$result=$hookmanager->executeHooks('printTopRightMenu',$parameters); // Note that $action and $object may have been modified by some hooks $result=$hookmanager->executeHooks('printTopRightMenu',$parameters); // Note that $action and $object may have been modified by some hooks
if (is_numeric($result)) if (is_numeric($result))
{ {
if (empty($result)) $toprightmenu.=$hookmanager->resPrint; // add if ($result== 0)
else $toprightmenu=$hookmanager->resPrint; // replace $toprightmenu.=$hookmanager->resPrint; // add
else
$toprightmenu=$hookmanager->resPrint; // replace
} }
else $toprightmenu.=$result; // For backward compatibility else
$toprightmenu.=$result; // For backward compatibility
// Link to module builder // Link to module builder
if (! empty($conf->modulebuilder->enabled)) if (! empty($conf->modulebuilder->enabled))