Save memory.

This commit is contained in:
Laurent Destailleur 2015-09-07 12:43:25 +02:00
parent 5ffab9720f
commit a44ab5168c
2 changed files with 6 additions and 5 deletions

View File

@ -364,7 +364,8 @@ class Form
}
/**
* Show a text and picto with tooltip on text or picto
* Show a text and picto with tooltip on text or picto.
* Can be called by an instancied $form->textwithtooltip or by a static call Form::textwithtooltip
*
* @param string $text Text to show
* @param string $htmltext HTML content of tooltip. Must be HTML/UTF8 encoded.

View File

@ -1428,7 +1428,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
$menumanager->showmenu('top'); // This contains a \n
print "</div>\n";
$form=new Form($db);
//$form=new Form($db);
// Define link to login card
$appli='Dolibarr';
@ -1496,11 +1496,11 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
$text ='<a href="'.$_SERVER["PHP_SELF"].'?'.$qs.($qs?'&':'').'optioncss=print" target="_blank">';
$text.= img_picto(":".$langs->trans("PrintContentArea"), 'printer.png', 'class="printer"');
$text.='</a>';
$toprightmenu.=$form->textwithtooltip('',$langs->trans("PrintContentArea"),2,1,$text,'login_block_elem',2);
$toprightmenu.=Form::textwithtooltip('',$langs->trans("PrintContentArea"),2,1,$text,'login_block_elem',2);
}
// Logout link
$toprightmenu.=$form->textwithtooltip('',$logouthtmltext,2,1,$logouttext,'login_block_elem',2);
$toprightmenu.=Form::textwithtooltip('',$logouthtmltext,2,1,$logouttext,'login_block_elem',2);
$toprightmenu.='</div>';
@ -1509,7 +1509,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
print "</div>\n";
print '</div></div>';
unset($form);
//unset($form);
}
if (empty($conf->dol_use_jmobile) && ! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print "</div><!-- End top layout -->\n";