1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-04 13:17:58 +02:00
This commit is contained in:
David Grudl
2012-01-19 06:00:38 +01:00
parent 5b68657842
commit 0723e8ffc8
2 changed files with 6 additions and 6 deletions

View File

@@ -118,7 +118,7 @@ class DibiConnection extends DibiObject
$this->onEvent[] = array(new DibiFirePhpLogger($filter), 'logEvent'); $this->onEvent[] = array(new DibiFirePhpLogger($filter), 'logEvent');
} }
if (class_exists('DibiNettePanel')) { if (class_exists('DibiNettePanel', FALSE)) {
$panel = new DibiNettePanel(isset($profilerCfg['explain']) ? $profilerCfg['explain'] : TRUE, $filter); $panel = new DibiNettePanel(isset($profilerCfg['explain']) ? $profilerCfg['explain'] : TRUE, $filter);
$panel->register($this); $panel->register($this);
} }

View File

@@ -287,11 +287,11 @@ class DibiDataSource extends DibiObject implements IDataSource
{ {
try { try {
return $this->connection->translate(' return $this->connection->translate('
SELECT %n', (empty($this->cols) ? '*' : $this->cols), ' SELECT %n', (empty($this->cols) ? '*' : $this->cols), '
FROM %SQL', $this->sql, ' FROM %SQL', $this->sql, '
%ex', $this->conds ? array('WHERE %and', $this->conds) : NULL, ' %ex', $this->conds ? array('WHERE %and', $this->conds) : NULL, '
%ex', $this->sorting ? array('ORDER BY %by', $this->sorting) : NULL, ' %ex', $this->sorting ? array('ORDER BY %by', $this->sorting) : NULL, '
%ofs %lmt', $this->offset, $this->limit %ofs %lmt', $this->offset, $this->limit
); );
} catch (Exception $e) { } catch (Exception $e) {
trigger_error($e->getMessage(), E_USER_ERROR); trigger_error($e->getMessage(), E_USER_ERROR);