From 5be44e56b4378af21653b68c1140ce04507af3ad Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Wed, 26 May 2010 05:12:39 +0000 Subject: [PATCH] ENHANCEMENT Added SQLiteDatabaseConfigurationHelper::getDatabaseVersion() --- code/SQLiteDatabaseConfigurationHelper.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/code/SQLiteDatabaseConfigurationHelper.php b/code/SQLiteDatabaseConfigurationHelper.php index 98cd985..e394749 100644 --- a/code/SQLiteDatabaseConfigurationHelper.php +++ b/code/SQLiteDatabaseConfigurationHelper.php @@ -107,9 +107,7 @@ class SQLiteDatabaseConfigurationHelper implements DatabaseConfigurationHelper { ); } - public function requireDatabaseVersion($databaseConfig) { - $success = false; - $error = ''; + public function getDatabaseVersion($databaseConfig) { $version = 0; 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) { $success = version_compare($version, '3.3', '>='); if(!$success) {