diff --git a/src/Kdyby/Doctrine/Diagnostics/Panel.php b/src/Kdyby/Doctrine/Diagnostics/Panel.php index e3464157..84afaa30 100644 --- a/src/Kdyby/Doctrine/Diagnostics/Panel.php +++ b/src/Kdyby/Doctrine/Diagnostics/Panel.php @@ -222,16 +222,24 @@ public function getPanel() return ''; } + $connParams = $this->connection->getParams(); + if ($connParams['driver'] === 'pdo_sqlite' && isset($connParams['path'])) { + $host = 'path: ' . basename($connParams['path']); + + } else { + $host = sprintf('host: %s%s/%s', + $this->connection->getHost(), + (($p = $this->connection->getPort()) ? ':' . $p : ''), + $this->connection->getDatabase() + ); + } + return $this->renderStyles() . - sprintf('

Queries: %s %s, host: %s

', + sprintf('

Queries: %s %s, %s

', count($this->queries), ($this->totalTime ? ', time: ' . sprintf('%0.3f', $this->totalTime * 1000) . ' ms' : ''), - sprintf('%s%s/%s', - $this->connection->getHost(), - (($p = $this->connection->getPort()) ? ':' . $p : ''), - $this->connection->getDatabase() - ) + $host ) . '
' . implode('
', array_filter(array(