From 1ce8643b8056266139552045fcdb48bbdb9c665b Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 28 Aug 2009 15:17:07 -0700 Subject: Fix for #440. Basically add a check that the mysql version is > 5.0.0. It was felt that actually listing the requirements might be overwhelming to novice users. --- installer/installer.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'installer/installer.php') 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; -- cgit v1.2.3