Changeset 2700 for trunk/include


Ignore:
Timestamp:
Oct 10, 2008, 3:11:31 PM (16 years ago)
Author:
rvelices
Message:
  • 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)
Location:
trunk/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/common.inc.php

    r2544 r2700  
    138138include(PHPWG_ROOT_PATH . 'include/constants.php');
    139139include(PHPWG_ROOT_PATH . 'include/functions.inc.php');
    140 include(PHPWG_ROOT_PATH . 'include/template.class.php');
    141140
    142141// Database connection
  • trunk/include/functions.inc.php

    r2620 r2700  
    3131include_once( PHPWG_ROOT_PATH .'include/functions_url.inc.php' );
    3232include_once( PHPWG_ROOT_PATH .'include/functions_plugins.inc.php' );
     33include_once( PHPWG_ROOT_PATH .'include/template.class.php');
    3334
    3435//----------------------------------------------------------- generic functions
     
    7071{
    7172  $boolean = true;
    72   if ( preg_match( '/^false$/i', $string ) )
     73  if ( 'false' == strtolower($string) )
    7374  {
    7475    $boolean = false;
     
    8788  if (is_bool($var))
    8889  {
    89     if ($var)
    90     {
    91       return 'true';
    92     }
    93     else
    94     {
    95       return 'false';
    96     }
     90    return $var ? 'true' : 'false';
    9791  }
    9892  else
Note: See TracChangeset for help on using the changeset viewer.