MINOR: sqlite properly introduces itself on dev build

This commit is contained in:
Andreas Piening 2010-04-14 03:06:22 +00:00
parent 98a59cad7b
commit e76d193b1e

View File

@ -359,7 +359,10 @@ class SQLite3Database extends SS_Database {
$ok = true;
if(!SapphireTest::using_temp_db() && !self::$checked_and_repaired) {
$this->alterationMessage("SQLite Version " . $this->getVersion(),"repaired");
$class = '';
if(get_class($this)=="SQLitePDODatabase") $class = 'PDO';
if(get_class($this)=="SQLite3Database") $class = '3';
$this->alterationMessage("SQLite$class Version " . $this->query("SELECT sqlite_version()")->value(),"repaired");
$this->alterationMessage("Checking database integrity","repaired");
if($msgs = $this->query('PRAGMA integrity_check')) foreach($msgs as $msg) if($msg['integrity_check'] != 'ok') { Debug::show($msg['integrity_check']); $ok = false; }
$this->query('VACUUM');