A little speed and memory improvement

This commit is contained in:
Laurent Destailleur 2010-08-29 17:43:51 +00:00
parent f8974f87f0
commit 4547233095
2 changed files with 9 additions and 21 deletions

View File

@ -3407,12 +3407,13 @@ function dol_eval($s)
return 1;
}
/**
* \brief For replace glob() function
*/
if (! function_exists('glob'))
{
function glob($pattern)
/**
* \brief For replace glob() function
*/
function glob($pattern)
{
#get pathname (everything up until the last / or \)
$path=$output=null;
@ -3480,9 +3481,9 @@ function pattern_match($pattern,$string)
}
/**
* \brief Return img flag of country for a language code or country code
* \param codelang Language code (en_IN, fr_CA...) or Country code (IN, FR)
* \return string HTML img string with flag.
* Return img flag of country for a language code or country code
* @param codelang Language code (en_IN, fr_CA...) or Country code (IN, FR)
* @return string HTML img string with flag.
*/
function picto_from_langcode($codelang)
{
@ -3506,17 +3507,4 @@ function picto_from_langcode($codelang)
return $ret;
}
/**
* \brief Define the style of background color of line
*/
function bcStyle($impair='impair', $pair='pair')
{
$bc=array();
$bc[0]='class="'.$impair.'"';
$bc[1]='class="'.$pair.'"';
return $bc;
}
?>

View File

@ -697,7 +697,7 @@ if (! defined('NOREQUIRETRAN'))
}
// Define some constants used for style of arrays
$bc = bcStyle();
$bc=array(0=>'class="impair"',1=>'class="pair"');
// Constants used to defined number of lines in textarea
if (empty($conf->browser->firefox))