From f9831bdcd090dbf67ab7262f1e0fcef58ec1e880 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Sun, 27 Jan 2008 02:24:41 +0000 Subject: prevent db upgrade if version too old, fixed user creation --- lib/class/update.class.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/class/update.class.php') diff --git a/lib/class/update.class.php b/lib/class/update.class.php index fa16503b..9bd67c81 100644 --- a/lib/class/update.class.php +++ b/lib/class/update.class.php @@ -314,6 +314,8 @@ class Update { // Prevent the script from timing out, which could be bad set_time_limit(0); + + /* Verify that there are no plugins installed //FIXME: provide a link to remove all plugins, otherwise this could turn into a catch 22 if (!$self::plugins_installed()) { @@ -324,6 +326,14 @@ class Update { $methods = array(); $current_version = self::get_version(); + + // Run a check to make sure that they don't try to upgrade from a version that + // won't work. + if ($current_version < '340001') { + echo "

Database version too old, please upgrade to Ampache-3.3.3.5 first

"; + return false; + } + $methods = get_class_methods('Update'); -- cgit