From 290250b1ec240f4968f7eebe15eff084613a0f6f Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Tue, 12 Oct 2010 01:50:12 +0000 Subject: [PATCH] MINOR SQLite3Database no longer shows an alteration message on dev/build with SQLite version. This is already done in r111851 --- code/SQLite3Database.php | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/code/SQLite3Database.php b/code/SQLite3Database.php index dd0fc93..e2a48fe 100644 --- a/code/SQLite3Database.php +++ b/code/SQLite3Database.php @@ -125,25 +125,14 @@ class SQLite3Database extends SS_Database { return true; } - /** - * The version of SQLite3. - * @var float - */ - protected $sqliteVersion; - /** * Get the version of SQLite3. * @return float */ public function getVersion() { - if(!$this->sqliteVersion) { - $db_version=$this->query("SELECT sqlite_version()")->value(); - - $this->sqliteVersion = $db_version; - } - return $this->sqliteVersion; + return $this->query("SELECT sqlite_version()")->value(); } - + /** * Execute PRAGMA commands. * works as getter and setter for connection params @@ -351,14 +340,9 @@ class SQLite3Database extends SS_Database { * @return boolean Return true if the table has integrity after the method is complete. */ public function checkAndRepairTable($tableName = null) { - $ok = true; if(!SapphireTest::using_temp_db() && !self::$checked_and_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; } if(self::$vacuum) {