';
// Execute hook printTopRightMenu (hooks should output string like '
')
- $parameters=array();
- $result=$hookmanager->executeHooks('printTopRightMenu', $parameters); // Note that $action and $object may have been modified by some hooks
+ $parameters = array();
+ $result = $hookmanager->executeHooks('printTopRightMenu', $parameters); // Note that $action and $object may have been modified by some hooks
if (is_numeric($result))
{
if ($result == 0)
- $toprightmenu.=$hookmanager->resPrint; // add
+ $toprightmenu .= $hookmanager->resPrint; // add
else
- $toprightmenu=$hookmanager->resPrint; // replace
+ $toprightmenu = $hookmanager->resPrint; // replace
}
else
{
- $toprightmenu.=$result; // For backward compatibility
+ $toprightmenu .= $result; // For backward compatibility
}
// Link to module builder
- if (! empty($conf->modulebuilder->enabled))
+ if (!empty($conf->modulebuilder->enabled))
{
- $text ='
';
+ $text = '';
//$text.= img_picto(":".$langs->trans("ModuleBuilder"), 'printer_top.png', 'class="printer"');
- $text.='';
- $text.='';
- $toprightmenu.=@Form::textwithtooltip('', $langs->trans("ModuleBuilder"), 2, 1, $text, 'login_block_elem', 2);
+ $text .= '
';
+ $text .= '';
+ $toprightmenu .= @Form::textwithtooltip('', $langs->trans("ModuleBuilder"), 2, 1, $text, 'login_block_elem', 2);
}
// Link to print main content area
if (empty($conf->global->MAIN_PRINT_DISABLELINK) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $conf->browser->layout != 'phone')
{
- $qs=dol_escape_htmltag($_SERVER["QUERY_STRING"]);
+ $qs = dol_escape_htmltag($_SERVER["QUERY_STRING"]);
if (is_array($_POST))
{
- foreach($_POST as $key=>$value) {
- if ($key!=='action' && $key!=='password' && !is_array($value)) $qs.='&'.$key.'='.urlencode($value);
+ foreach ($_POST as $key=>$value) {
+ if ($key !== 'action' && $key !== 'password' && !is_array($value)) $qs .= '&'.$key.'='.urlencode($value);
}
}
- $qs.=(($qs && $morequerystring)?'&':'').$morequerystring;
- $text ='
';
+ $qs .= (($qs && $morequerystring) ? '&' : '').$morequerystring;
+ $text = '';
//$text.= img_picto(":".$langs->trans("PrintContentArea"), 'printer_top.png', 'class="printer"');
- $text.='';
- $text.='';
- $toprightmenu.=@Form::textwithtooltip('', $langs->trans("PrintContentArea"), 2, 1, $text, 'login_block_elem', 2);
+ $text .= '
';
+ $text .= '';
+ $toprightmenu .= @Form::textwithtooltip('', $langs->trans("PrintContentArea"), 2, 1, $text, 'login_block_elem', 2);
}
// Link to Dolibarr wiki pages
@@ -1687,48 +1687,48 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead
{
$langs->load("help");
- $helpbaseurl='';
- $helppage='';
- $mode='';
+ $helpbaseurl = '';
+ $helppage = '';
+ $mode = '';
- if (empty($helppagename)) $helppagename='EN:User_documentation|FR:Documentation_utilisateur|ES:Documentación_usuarios';
+ if (empty($helppagename)) $helppagename = 'EN:User_documentation|FR:Documentation_utilisateur|ES:Documentación_usuarios';
// Get helpbaseurl, helppage and mode from helppagename and langs
- $arrayres=getHelpParamFor($helppagename, $langs);
- $helpbaseurl=$arrayres['helpbaseurl'];
- $helppage=$arrayres['helppage'];
- $mode=$arrayres['mode'];
+ $arrayres = getHelpParamFor($helppagename, $langs);
+ $helpbaseurl = $arrayres['helpbaseurl'];
+ $helppage = $arrayres['helppage'];
+ $mode = $arrayres['mode'];
// Link to help pages
if ($helpbaseurl && $helppage)
{
- $text='';
- if(!empty($conf->global->MAIN_SHOWDATABASENAMEINHELPPAGESLINK)) {
+ $text = '';
+ if (!empty($conf->global->MAIN_SHOWDATABASENAMEINHELPPAGESLINK)) {
$langs->load('admin');
- $appli .= '
' . $langs->trans("Database") . ': ' . $db->database_name;
+ $appli .= '
'.$langs->trans("Database").': '.$db->database_name;
}
- $title=$appli.'
';
- $title.=$langs->trans($mode == 'wiki' ? 'GoToWikiHelpPage': 'GoToHelpPage');
- if ($mode == 'wiki') $title.=' - '.$langs->trans("PageWiki").' "'.dol_escape_htmltag(strtr($helppage, '_', ' ')).'"';
- $text.='
';
- $text.='';
- $text.='';
- $toprightmenu.=@Form::textwithtooltip('', $title, 2, 1, $text, 'login_block_elem', 2);
+ $title = $appli.'
';
+ $title .= $langs->trans($mode == 'wiki' ? 'GoToWikiHelpPage' : 'GoToHelpPage');
+ if ($mode == 'wiki') $title .= ' - '.$langs->trans("PageWiki").' "'.dol_escape_htmltag(strtr($helppage, '_', ' ')).'"';
+ $text .= '
';
+ $text .= '';
+ $text .= '';
+ $toprightmenu .= @Form::textwithtooltip('', $title, 2, 1, $text, 'login_block_elem', 2);
}
}
// Logout link
- $toprightmenu.=@Form::textwithtooltip('', $logouthtmltext, 2, 1, $logouttext, 'login_block_elem logout-btn', 2);
+ $toprightmenu .= @Form::textwithtooltip('', $logouthtmltext, 2, 1, $logouttext, 'login_block_elem logout-btn', 2);
- $toprightmenu.='