Added optional SQL queries debug
This commit is contained in:
parent
5d51297c16
commit
4b5c13519c
3 changed files with 12 additions and 4 deletions
|
@ -8,6 +8,7 @@ filesPath=./files/
|
|||
thumbsPath=./thumbs/
|
||||
mediaPath=./public_html/media/
|
||||
title=szurubooru
|
||||
debugQueries=0
|
||||
|
||||
[browsing]
|
||||
usersPerPage=8
|
||||
|
|
|
@ -115,7 +115,7 @@ body {
|
|||
|
||||
footer {
|
||||
text-align: center;
|
||||
margin-top: 1em;
|
||||
margin: 1em 0;
|
||||
padding-top: 0.5em;
|
||||
border-top: 1px solid #eee;
|
||||
font-size: small;
|
||||
|
@ -306,3 +306,8 @@ button:hover {
|
|||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
pre.debug {
|
||||
text-align: left;
|
||||
color: black;
|
||||
}
|
||||
|
|
|
@ -98,9 +98,11 @@
|
|||
|
||||
<footer>
|
||||
<div class="main-wrapper">
|
||||
Load: <?php echo sprintf('%.05f', microtime(true) - trueStartTime()) ?>s
|
||||
|
||||
Queries: <?php echo count(queryLogger()->getLogs()) ?>
|
||||
<span>Load: <?php echo sprintf('%.05f', microtime(true) - trueStartTime()) ?>s</span>
|
||||
<span>Queries: <?php echo count(queryLogger()->getLogs()) ?></span>
|
||||
<?php if ($this->config->main->debugQueries): ?>
|
||||
<pre class="debug"><?php echo join('<br>', array_map(function($x) { return preg_replace('/\s+/', ' ', $x); }, queryLogger()->getLogs())) ?></pre>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
|
|
Loading…
Reference in a new issue