MINOR SQLite3Database no longer shows an alteration message on dev/build with SQLite version. This is already done in r111851

This commit is contained in:
Sean Harvey 2010-10-12 01:50:12 +00:00
parent de1c8cb18b
commit 290250b1ec

View File

@ -125,23 +125,12 @@ 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();
}
/**
@ -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) {