aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/common.inc.php1
-rw-r--r--include/functions.inc.php12
2 files changed, 3 insertions, 10 deletions
diff --git a/include/common.inc.php b/include/common.inc.php
index fe0e5a542..cbe1d6d89 100644
--- a/include/common.inc.php
+++ b/include/common.inc.php
@@ -137,7 +137,6 @@ include(PHPWG_ROOT_PATH . 'include/config_default.inc.php');
@include(PHPWG_ROOT_PATH. 'include/config_local.inc.php');
include(PHPWG_ROOT_PATH . 'include/constants.php');
include(PHPWG_ROOT_PATH . 'include/functions.inc.php');
-include(PHPWG_ROOT_PATH . 'include/template.class.php');
// Database connection
@mysql_connect( $cfgHote, $cfgUser, $cfgPassword ) or my_error( 'mysql_connect', true );
diff --git a/include/functions.inc.php b/include/functions.inc.php
index f2c5511dd..a75df8c4f 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -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
{