summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-01-27 02:24:41 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-01-27 02:24:41 +0000
commitf9831bdcd090dbf67ab7262f1e0fcef58ec1e880 (patch)
treec4efe6af4d00ace8f351f298c2c2bd3fe2cd87ca
parentff3fd544903062e390659e1f89bba9e30d1ee305 (diff)
downloadampache-f9831bdcd090dbf67ab7262f1e0fcef58ec1e880.tar.gz
ampache-f9831bdcd090dbf67ab7262f1e0fcef58ec1e880.tar.bz2
ampache-f9831bdcd090dbf67ab7262f1e0fcef58ec1e880.zip
prevent db upgrade if version too old, fixed user creation
-rwxr-xr-xdocs/CHANGELOG2
-rw-r--r--lib/class/update.class.php10
-rw-r--r--templates/show_add_user.inc.php2
3 files changed, 13 insertions, 1 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index 32e7b3f8..962a5b76 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -4,6 +4,8 @@
--------------------------------------------------------------------------
v.3.4-Beta2
+ - Added check for old database versions, prevent upgrade if too old
+ - Fixed issue with user creation (Thx yoog)
- Fixed Now Playing refresh
- Fixed single song update (Thx alex2008)
- Added Checkbox for All Playlists filter (Admin Only) also made
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 "<p align=\"center\">Database version too old, please upgrade to <a href=\"http://ampache.org/downloads/ampache-3.3.3.5.tar.gz\">Ampache-3.3.3.5</a> first</p>";
+ return false;
+ }
+
$methods = get_class_methods('Update');
diff --git a/templates/show_add_user.inc.php b/templates/show_add_user.inc.php
index dbe57aa4..c52c33de 100644
--- a/templates/show_add_user.inc.php
+++ b/templates/show_add_user.inc.php
@@ -20,7 +20,7 @@
*/
$form_string = generate_password('32');
-$_SESSION['forms']['createuser'] = $form_string;
+$_SESSION['forms']['adminuser'] = $form_string;
?>
<?php show_box_top(_('Adding a New User')); ?>
<?php Error::display('general'); ?>