diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-05-10 09:11:22 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-05-10 09:11:22 +0000 |
commit | 65912668d225fd72a8efb9f73520609523be400b (patch) | |
tree | f90972e0bf112b21e460d5d870ecf7d4af486b98 /lib/class/update.class.php | |
parent | dfcd869f3748132755de63db9e7eabb6dee41af1 (diff) | |
download | ampache-65912668d225fd72a8efb9f73520609523be400b.tar.gz ampache-65912668d225fd72a8efb9f73520609523be400b.tar.bz2 ampache-65912668d225fd72a8efb9f73520609523be400b.zip |
decided to not try to detect the charset, its just such a pain in the ass and I have no figured out a way to actually get it right, reduced frequency of prune calls to speed up login
Diffstat (limited to 'lib/class/update.class.php')
-rw-r--r-- | lib/class/update.class.php | 41 |
1 files changed, 36 insertions, 5 deletions
diff --git a/lib/class/update.class.php b/lib/class/update.class.php index 23fac871..6e846c44 100644 --- a/lib/class/update.class.php +++ b/lib/class/update.class.php @@ -273,6 +273,10 @@ class Update { $version[] = array('version' => '340017','description'=>$update_string); + $update_string = '- Attempt to detect and correct charset issues between filesystem and database.<br />'; + + $version[] = array('version' => '340018','description'=>$update_string); + return $version; @@ -324,8 +328,6 @@ 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()) { @@ -359,7 +361,13 @@ class Update { if ($version['version'] > $current_version) { $update_function = "update_" . $version['version']; if (in_array($update_function,$methods)) { - call_user_func(array('Update',$update_function)); + $success = call_user_func(array('Update',$update_function)); + + // If the update fails drop out + if (!$success) { + Error::display('update'); + return false; + } } } @@ -721,6 +729,8 @@ class Update { self::set_version('db_version','340003'); + return true; + } // update_340003 /** @@ -959,6 +969,8 @@ class Update { self::set_version('db_version','340008'); + return true; + } // update_340008 /** @@ -988,6 +1000,8 @@ class Update { self::set_version('db_version','340009'); + return true; + } // update_340009 /** @@ -1023,6 +1037,8 @@ class Update { self::set_version('db_version','340010'); + return true; + } // update_340010 /** @@ -1045,9 +1061,10 @@ class Update { ") ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci"; $db_results = Dba::query($sql); - self::set_version('db_version','340011'); + return true; + } // 340011 /** @@ -1077,6 +1094,8 @@ class Update { self::set_version('db_version','340012'); + return true; + } // update_340012 /** @@ -1107,6 +1126,8 @@ class Update { self::set_version('db_version','340013'); + return true; + } // update_340013 /** @@ -1132,6 +1153,8 @@ class Update { self::set_version('db_version','340014'); + return true; + } // update_340014 /** @@ -1172,6 +1195,8 @@ class Update { } self::set_version('db_version','340015'); + + return true; } // update_340015 @@ -1187,6 +1212,8 @@ class Update { self::set_version('db_version','340016'); + return true; + } // update_340016 /** @@ -1210,6 +1237,8 @@ class Update { self::set_version('db_version','340017'); + return true; + } // update_340017 /** @@ -1293,7 +1322,9 @@ class Update { } // end tables - //self::set_version('db_version','340018'); + self::set_version('db_version','340018'); + + return true; } // update_340018 |