diff options
author | Chad Kieffer <ckieffer@gmail.com> | 2009-08-28 16:38:02 -0600 |
---|---|---|
committer | Chad Kieffer <ckieffer@gmail.com> | 2009-08-28 16:38:02 -0600 |
commit | 974e8f9547284e052eef2d8b9668f9e85c585b49 (patch) | |
tree | f5c99f379ff8bea79e6f4660354f5829b7beabd6 /installer/installer.php | |
parent | fc1c4d5119959a4db0d49b7c0aa618749f27c740 (diff) | |
parent | 1ce8643b8056266139552045fcdb48bbdb9c665b (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'installer/installer.php')
-rw-r--r-- | installer/installer.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/installer/installer.php b/installer/installer.php index b0af561e..456cffaa 100644 --- a/installer/installer.php +++ b/installer/installer.php @@ -104,6 +104,13 @@ class installer { mysql_select_db($config["dbname"]); } + static function verify_version($config) { + $result = mysql_query("SHOW VARIABLES WHERE variable_name = \"version\""); + $row = mysql_fetch_object($result); + $version = substr($row->Value, 0, strpos($row->Value, "-")); + return version_compare($version, "5.0.0", ">="); + } + static function db_empty($config) { $query = "SHOW TABLES IN {$config['dbname']} LIKE '{$config['prefix']}items'"; return mysql_num_rows(mysql_query($query)) == 0; |