aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.inc.php
diff options
context:
space:
mode:
authornikrou <nikrou@piwigo.org>2006-01-21 20:38:29 +0000
committernikrou <nikrou@piwigo.org>2006-01-21 20:38:29 +0000
commit02f08d3c4fc7154f0c2b0157e531e0b256c6f0ba (patch)
treec05fcdc0bc6c46580877a8282cf2eeb21d1a0ef9 /include/functions.inc.php
parent0b28c9da75d677e4cedacdfdd865732a333de11c (diff)
merge branch 1.5 r1010:1011 into BSF:
- bug 268 fixed: display debug content correctly git-svn-id: http://piwigo.org/svn/trunk@1012 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions.inc.php')
-rw-r--r--include/functions.inc.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php
index f5710bbdd..9586dfc7f 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;
+ global $conf,$page,$debug;
$start = get_moment();
$result = mysql_query($query) or my_error($query."\n");
@@ -452,12 +452,12 @@ function pwg_query($query)
$output.= '<pre>['.$page['count_queries'].'] ';
$output.= "\n".$query;
$output.= "\n".'(this query time : ';
- $output.= number_format($time, 3, '.', ' ').' s)</b>';
+ $output.= '<b>'.number_format($time, 3, '.', ' ').' s)</b>';
$output.= "\n".'(total SQL time : ';
$output.= number_format($page['queries_time'], 3, '.', ' ').' s)';
- $output.= '</pre>';
+ $output.= "</pre>\n";
- echo $output;
+ $debug .= $output;
}
return $result;
@@ -471,9 +471,10 @@ function pwg_debug( $string )
$now2 = explode( '.', $now[0] );
$now2 = $now[1].'.'.$now2[1];
$time = number_format( $now2 - $t2, 3, '.', ' ').' s';
+ $debug .= '<p>';
$debug.= '['.$time.', ';
$debug.= $count_queries.' queries] : '.$string;
- $debug.= "\n";
+ $debug.= "</p>\n";
}
/**