1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-07 22:56:35 +02:00

DibiNettePanel: works with disabled bar [Closes #43]

This commit is contained in:
David Grudl
2012-01-12 01:04:35 +01:00
parent 2a5934c385
commit 4c85d1d55c

View File

@@ -53,12 +53,12 @@ class DibiNettePanel extends DibiObject implements IBarPanel
class_alias('Nette\Diagnostics\Debugger', 'NDebugger'); // PHP 5.2 code compatibility
}
if (is_callable('NDebugger::enable')) {
NDebugger::$bar->addPanel($this);
NDebugger::$blueScreen->addPanel(array($this, 'renderException'), __CLASS__);
NDebugger::$bar && NDebugger::$bar->addPanel($this);
NDebugger::$blueScreen && NDebugger::$blueScreen->addPanel(array($this, 'renderException'), __CLASS__);
$connection->onEvent[] = array($this, 'logEvent');
} elseif (is_callable('Debugger::enable')) {
Debugger::$bar->addPanel($this);
Debugger::$blueScreen->addPanel(array($this, 'renderException'), __CLASS__);
Debugger::$bar && Debugger::$bar->addPanel($this);
Debugger::$blueScreen && Debugger::$blueScreen->addPanel(array($this, 'renderException'), __CLASS__);
$connection->onEvent[] = array($this, 'logEvent');
}
}