Changeset 592


Ignore:
Timestamp:
Nov 5, 2004, 10:36:35 PM (19 years ago)
Author:
z0rglub
Message:
  • DEBUG constant divided into $confshow_queries and $confshow_gt (display generation time at the bottom of each page)
Location:
trunk/include
Files:
5 edited

Legend:

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

    r587 r592  
    147147// admin/infos_images
    148148$conf['info_nb_elements_page'] = 5;
     149
     150// default_language : language used if language set in user database is not
     151// available
     152$conf['default_language'] = 'en_UK.iso-8859-1';
     153
     154// show_queries : for debug purpose, show queries and execution times
     155$conf['show_queries'] = false;
     156
     157// show_gt : display generation time at the bottom of each page
     158$conf['show_gt'] = true;
    149159?>
  • trunk/include/constants.php

    r589 r592  
    2727
    2828// Default settings
    29 define('DEFAULT_LANGUAGE', 'en_UK.iso-8859-1');
    3029define('PHPWG_VERSION', 'BSF');
    3130define('PHPWG_URL', 'http://www.phpwebgallery.net');
    3231define('PHPWG_FORUM_URL', 'http://forum.phpwebgallery.net');
    3332
    34 // Debug Level : 1 = on, 0 = off
    35 define('DEBUG', 0);
    36  
    3733// User level
    3834define('ANONYMOUS', 2);
  • trunk/include/functions.inc.php

    r587 r592  
    447447function pwg_query($query)
    448448{
     449  global $conf;
     450 
    449451  $start = get_moment();
    450452  $result = mysql_query($query);
    451453
    452   if (DEBUG)
     454  if ($conf['show_queries'])
    453455  {
    454456    global $count_queries,$queries_time;
  • trunk/include/functions_user.inc.php

    r587 r592  
    227227  if ( !file_exists(@realpath(PHPWG_ROOT_PATH . 'language/' . $language . '/common.lang.php')) )
    228228  {
    229     $language = DEFAULT_LANGUAGE;
     229    $language = $conf['default_language'];
    230230  }
    231231  include_once(PHPWG_ROOT_PATH . 'language/' . $language . '/common.lang.php');
     
    236236    if ( !file_exists(@realpath(PHPWG_ROOT_PATH . 'language/' . $language. '/admin.lang.php')) )
    237237    {
    238       $language = DEFAULT_LANGUAGE;
     238      $language = $conf['default_language'];
    239239    }
    240240  include_once(PHPWG_ROOT_PATH . 'language/' . $language . '/admin.lang.php');
  • trunk/include/page_tail.php

    r589 r592  
    4444    ));
    4545   
    46 //if (DEBUG)
    47 if (true)
     46if ($conf['show_gt'])
    4847{
    4948  $template->assign_block_vars('debug', array());
Note: See TracChangeset for help on using the changeset viewer.