mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-06 01:42:29 +02:00
- replace a preg_match with simple comparison (faster)
- try to get rid of some JS strict warnings in FF (hope it's fixed) - template.class.php is included from functions.inc.php instead of common,upgrade,install (maybe later I will try to see the perf impact of compacting/compiling functions.inc.php together with the included files from itself) git-svn-id: http://piwigo.org/svn/trunk@2700 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -30,6 +30,7 @@ include_once( PHPWG_ROOT_PATH .'include/functions_html.inc.php' );
|
||||
include_once( PHPWG_ROOT_PATH .'include/functions_tag.inc.php' );
|
||||
include_once( PHPWG_ROOT_PATH .'include/functions_url.inc.php' );
|
||||
include_once( PHPWG_ROOT_PATH .'include/functions_plugins.inc.php' );
|
||||
include_once( PHPWG_ROOT_PATH .'include/template.class.php');
|
||||
|
||||
//----------------------------------------------------------- generic functions
|
||||
|
||||
@@ -69,7 +70,7 @@ function get_enums($table, $field)
|
||||
function get_boolean( $string )
|
||||
{
|
||||
$boolean = true;
|
||||
if ( preg_match( '/^false$/i', $string ) )
|
||||
if ( 'false' == strtolower($string) )
|
||||
{
|
||||
$boolean = false;
|
||||
}
|
||||
@@ -86,14 +87,7 @@ function boolean_to_string($var)
|
||||
{
|
||||
if (is_bool($var))
|
||||
{
|
||||
if ($var)
|
||||
{
|
||||
return 'true';
|
||||
}
|
||||
else
|
||||
{
|
||||
return 'false';
|
||||
}
|
||||
return $var ? 'true' : 'false';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user