From c2b9863da0f560f5afb2adb01ca32431f442c352 Mon Sep 17 00:00:00 2001 From: rvelices Date: Sat, 11 Feb 2006 19:36:09 +0000 Subject: remake Remote Site/Synchro - bug on commentable + use l10n instead of get_lang git-svn-id: http://piwigo.org/svn/trunk@1033 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions.inc.php | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'include') diff --git a/include/functions.inc.php b/include/functions.inc.php index 49f1b44bd..b00d856ae 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -430,7 +430,7 @@ function format_date($date, $type = 'us', $show_time = false) function pwg_query($query) { - global $conf,$page,$debug; + global $conf,$page,$debug,$t2; $start = get_moment(); $result = mysql_query($query) or my_error($query."\n"); @@ -455,6 +455,8 @@ function pwg_query($query) $output.= ''.number_format($time, 3, '.', ' ').' s)'; $output.= "\n".'(total SQL time : '; $output.= number_format($page['queries_time'], 3, '.', ' ').' s)'; + $output.= "\n".'(total time : '; + $output.= number_format( ($time+$start-$t2), 3, '.', ' ').' s)'; $output.= "\n"; $debug .= $output; @@ -465,7 +467,7 @@ function pwg_query($query) function pwg_debug( $string ) { - global $debug,$t2,$count_queries; + global $debug,$t2,$page; $now = explode( ' ', microtime() ); $now2 = explode( '.', $now[0] ); @@ -473,7 +475,7 @@ function pwg_debug( $string ) $time = number_format( $now2 - $t2, 3, '.', ' ').' s'; $debug .= '

'; $debug.= '['.$time.', '; - $debug.= $count_queries.' queries] : '.$string; + $debug.= $page['count_queries'].' queries] : '.$string; $debug.= "

\n"; } @@ -973,20 +975,6 @@ SELECT '.$conf['user_fields']['email'].' return $email; } -/** - * returns the $str in current language if possible or $str enclosed - * in special chars - */ -function get_lang($str) -{ - global $lang; - if ( isset($lang[$str]) ) - { - return $lang[$str]; - } - return '@@'.$str.'@@'; -} - /** * which upgrades are available ? * -- cgit v1.2.3