mirror of
https://github.com/dg/dibi.git
synced 2025-02-24 10:53:17 +01:00
fix: DibiNettePanel is called only if required interface is available
This commit is contained in:
parent
9ba0cf62d1
commit
9be3bd7a53
@ -37,7 +37,6 @@ require_once dirname(__FILE__) . '/libs/DibiDatabaseInfo.php';
|
||||
require_once dirname(__FILE__) . '/libs/DibiEvent.php';
|
||||
require_once dirname(__FILE__) . '/libs/DibiFileLogger.php';
|
||||
require_once dirname(__FILE__) . '/libs/DibiFirePhpLogger.php';
|
||||
require_once dirname(__FILE__) . '/Nette/DibiNettePanel.php';
|
||||
|
||||
|
||||
|
||||
|
@ -119,9 +119,11 @@ class DibiConnection extends DibiObject
|
||||
$this->onEvent[] = array(new DibiFirePhpLogger($filter), 'logEvent');
|
||||
}
|
||||
|
||||
if (interface_exists('Nette\Diagnostics\IBarPanel') || interface_exists('IBarPanel')) {
|
||||
$panel = new DibiNettePanel(isset($profilerCfg['explain']) ? $profilerCfg['explain'] : TRUE, $filter);
|
||||
$panel->register($this);
|
||||
}
|
||||
}
|
||||
|
||||
$this->substitutes = new DibiHashMap(create_function('$expr', 'return ":$expr:";'));
|
||||
if (!empty($config['substitutes'])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user