1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-09 15:47:23 +02:00

DibiProfiler: explain query doesn't overwrite dibi::$sql

This commit is contained in:
PetrP
2010-06-14 21:29:24 +08:00
committed by David Grudl
parent e8de6f21c9
commit e8990c9be6

View File

@@ -148,10 +148,12 @@ class DibiProfiler extends DibiObject implements IDibiProfiler, /*Nette\*/IDebug
);
if ($this->explainQuery && $event === self::SELECT) {
$tmpSql = dibi::$sql;
try {
$ticket[5] = dibi::dump($connection->setProfiler(NULL)->nativeQuery('EXPLAIN ' . $sql), TRUE);
} catch (DibiException $e) {}
$connection->setProfiler($this);
dibi::$sql = $tmpSql;
}
if ($this->useFirebug && !headers_sent()) {