ENHANCEMENT Added SQLiteDatabaseConfigurationHelper::getDatabaseVersion()

This commit is contained in:
Sean Harvey 2010-05-26 05:12:39 +00:00
parent 016d848a87
commit 5be44e56b4

View File

@ -107,9 +107,7 @@ class SQLiteDatabaseConfigurationHelper implements DatabaseConfigurationHelper {
); );
} }
public function requireDatabaseVersion($databaseConfig) { public function getDatabaseVersion($databaseConfig) {
$success = false;
$error = '';
$version = 0; $version = 0;
if(class_exists('SQLite3')) { if(class_exists('SQLite3')) {
@ -128,6 +126,14 @@ class SQLiteDatabaseConfigurationHelper implements DatabaseConfigurationHelper {
} }
} }
return $version;
}
public function requireDatabaseVersion($databaseConfig) {
$success = false;
$error = '';
$version = $this->getDatabaseVersion($databaseConfig);
if($version) { if($version) {
$success = version_compare($version, '3.3', '>='); $success = version_compare($version, '3.3', '>=');
if(!$success) { if(!$success) {