mirror of
https://github.com/openvk/chandler.git
synced 2025-01-22 15:24:15 +03:00
Fix error in DatabasePanel
This commit is contained in:
parent
6ca0e6a0b6
commit
60bbd5b8b5
1 changed files with 13 additions and 5 deletions
|
@ -8,10 +8,15 @@ class DatabasePanel implements \Tracy\IBarPanel
|
||||||
|
|
||||||
public function getTab()
|
public function getTab()
|
||||||
{
|
{
|
||||||
$count = sizeof($GLOBALS["dbgSqlQueries"]);
|
if(isset($GLOBALS["dbgSqlQueries"])) {
|
||||||
$time = ceil($GLOBALS["dbgSqlTime"] * 1000);
|
$count = sizeof($GLOBALS["dbgSqlQueries"]);
|
||||||
$svg = file_get_contents(__DIR__ . "/templates/db-icon.svg");
|
$time = ceil($GLOBALS["dbgSqlTime"] * 1000);
|
||||||
|
} else {
|
||||||
|
$count = "No";
|
||||||
|
$time = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$svg = file_get_contents(__DIR__ . "/templates/db-icon.svg");
|
||||||
return <<<EOF
|
return <<<EOF
|
||||||
<span title="DB Queries">
|
<span title="DB Queries">
|
||||||
$svg
|
$svg
|
||||||
|
@ -22,6 +27,9 @@ EOF;
|
||||||
|
|
||||||
public function getPanel()
|
public function getPanel()
|
||||||
{
|
{
|
||||||
|
if(!isset($GLOBALS["dbgSqlQueries"]))
|
||||||
|
return "<b>No queries were made...</b>";
|
||||||
|
|
||||||
$html = <<<HTML
|
$html = <<<HTML
|
||||||
<h1>Queries:</h1>
|
<h1>Queries:</h1>
|
||||||
<div class="tracy-inner">
|
<div class="tracy-inner">
|
||||||
|
@ -38,4 +46,4 @@ HTML;
|
||||||
|
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue