Perf: Fight against useless is_file, file_exists, is_dir or dir_exist as the decrease seriously performance.
This commit is contained in:
parent
3a4abc4e28
commit
bf196b113c
@ -25,7 +25,7 @@
|
||||
* \file htdocs/main.inc.php
|
||||
* \ingroup core
|
||||
* \brief File that defines environment for Dolibarr pages only (variables not required by scripts)
|
||||
* \version $Id: main.inc.php,v 1.763 2011/08/17 19:26:48 eldy Exp $
|
||||
* \version $Id: main.inc.php,v 1.764 2011/08/18 21:09:48 eldy Exp $
|
||||
*/
|
||||
|
||||
@ini_set('memory_limit', '64M'); // This may be useless if memory is hard limited by your PHP
|
||||
@ -843,9 +843,12 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
||||
// Displays meta
|
||||
print '<meta name="robots" content="noindex,nofollow">'."\n"; // Evite indexation par robots
|
||||
print '<meta name="author" content="Dolibarr Development Team">'."\n";
|
||||
if (file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/favicon.ico')){
|
||||
if (! empty($conf->global->MAIN_USEFAVICON_THEME) && file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/favicon.ico'))
|
||||
{
|
||||
print '<link rel="shortcut icon" type="image/x-icon" href="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/favicon.ico">'."\n";
|
||||
}else{
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<link rel="shortcut icon" type="image/x-icon" href="'.DOL_URL_ROOT.'/favicon.ico">'."\n";
|
||||
}
|
||||
// Displays title
|
||||
|
||||
Loading…
Reference in New Issue
Block a user