From eee105f607e4c80b2f53cbf08959a70e37e6b98c Mon Sep 17 00:00:00 2001 From: David Grudl Date: Wed, 11 Jan 2012 00:18:17 +0100 Subject: [PATCH] class DibiNettePanel is included in dibi.php [Closes #49] --- dibi/dibi.php | 3 +++ dibi/libs/DibiConnection.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dibi/dibi.php b/dibi/dibi.php index a767bf6..8fdfb05 100644 --- a/dibi/dibi.php +++ b/dibi/dibi.php @@ -37,6 +37,9 @@ 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'; +if (interface_exists('Nette\Diagnostics\IBarPanel') || interface_exists('IBarPanel')) { + require_once dirname(__FILE__) . '/Nette/DibiNettePanel.php'; +} diff --git a/dibi/libs/DibiConnection.php b/dibi/libs/DibiConnection.php index 1e3778f..0dff2b1 100644 --- a/dibi/libs/DibiConnection.php +++ b/dibi/libs/DibiConnection.php @@ -119,7 +119,7 @@ class DibiConnection extends DibiObject $this->onEvent[] = array(new DibiFirePhpLogger($filter), 'logEvent'); } - if (interface_exists('Nette\Diagnostics\IBarPanel') || interface_exists('IBarPanel')) { + if (class_exists('DibiNettePanel')) { $panel = new DibiNettePanel(isset($profilerCfg['explain']) ? $profilerCfg['explain'] : TRUE, $filter); $panel->register($this); }