mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-05-18 07:16:11 +02:00
- DEFAULT_LANGUAGE constant moved to $conf['default_language']
- DEBUG constant divided into $conf['show_queries'] and $conf['show_gt'] (display generation time at the bottom of each page) git-svn-id: http://piwigo.org/svn/trunk@592 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -146,4 +146,14 @@ $conf['session_id_size'] = 10;
|
||||
// info_nb_elements_page : number of elements to display per page on
|
||||
// admin/infos_images
|
||||
$conf['info_nb_elements_page'] = 5;
|
||||
|
||||
// default_language : language used if language set in user database is not
|
||||
// available
|
||||
$conf['default_language'] = 'en_UK.iso-8859-1';
|
||||
|
||||
// show_queries : for debug purpose, show queries and execution times
|
||||
$conf['show_queries'] = false;
|
||||
|
||||
// show_gt : display generation time at the bottom of each page
|
||||
$conf['show_gt'] = true;
|
||||
?>
|
||||
|
||||
@@ -26,14 +26,10 @@
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
// Default settings
|
||||
define('DEFAULT_LANGUAGE', 'en_UK.iso-8859-1');
|
||||
define('PHPWG_VERSION', 'BSF');
|
||||
define('PHPWG_URL', 'http://www.phpwebgallery.net');
|
||||
define('PHPWG_FORUM_URL', 'http://forum.phpwebgallery.net');
|
||||
|
||||
// Debug Level : 1 = on, 0 = off
|
||||
define('DEBUG', 0);
|
||||
|
||||
// User level
|
||||
define('ANONYMOUS', 2);
|
||||
|
||||
|
||||
@@ -446,10 +446,12 @@ function pwg_write_debug()
|
||||
|
||||
function pwg_query($query)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$start = get_moment();
|
||||
$result = mysql_query($query);
|
||||
|
||||
if (DEBUG)
|
||||
if ($conf['show_queries'])
|
||||
{
|
||||
global $count_queries,$queries_time;
|
||||
|
||||
|
||||
@@ -226,7 +226,7 @@ function init_userprefs($userdata)
|
||||
|
||||
if ( !file_exists(@realpath(PHPWG_ROOT_PATH . 'language/' . $language . '/common.lang.php')) )
|
||||
{
|
||||
$language = DEFAULT_LANGUAGE;
|
||||
$language = $conf['default_language'];
|
||||
}
|
||||
include_once(PHPWG_ROOT_PATH . 'language/' . $language . '/common.lang.php');
|
||||
|
||||
@@ -235,7 +235,7 @@ function init_userprefs($userdata)
|
||||
{
|
||||
if ( !file_exists(@realpath(PHPWG_ROOT_PATH . 'language/' . $language. '/admin.lang.php')) )
|
||||
{
|
||||
$language = DEFAULT_LANGUAGE;
|
||||
$language = $conf['default_language'];
|
||||
}
|
||||
include_once(PHPWG_ROOT_PATH . 'language/' . $language . '/admin.lang.php');
|
||||
include_once(PHPWG_ROOT_PATH . 'language/' . $language . '/faq.lang.php');
|
||||
|
||||
@@ -43,8 +43,7 @@ $template->assign_vars(
|
||||
|
||||
));
|
||||
|
||||
//if (DEBUG)
|
||||
if (true)
|
||||
if ($conf['show_gt'])
|
||||
{
|
||||
$template->assign_block_vars('debug', array());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user