diff options
author | Paul Arthur <paul.arthur@flowerysong.com> | 2012-03-06 15:32:56 -0500 |
---|---|---|
committer | Paul Arthur <paul.arthur@flowerysong.com> | 2012-03-06 15:32:56 -0500 |
commit | 798318250390d983bc82df5efa37414da128e0ae (patch) | |
tree | 59bed0380594d792967f39edd1fa0b6c71265ef6 | |
parent | 3525ad78cdb50fee2428fa5e6e31e114a2385417 (diff) | |
download | ampache-798318250390d983bc82df5efa37414da128e0ae.tar.gz ampache-798318250390d983bc82df5efa37414da128e0ae.tar.bz2 ampache-798318250390d983bc82df5efa37414da128e0ae.zip |
Use a flag to determine whether an outdated database is OK
This matches the handling of NO_SESSION and gives us some needed leeway
for the CLI tools.
-rw-r--r-- | lib/init.php | 2 | ||||
-rw-r--r-- | update.php | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/init.php b/lib/init.php index 0b8cd639..955a065b 100644 --- a/lib/init.php +++ b/lib/init.php @@ -280,7 +280,7 @@ unset($results); flip_class(array('odd','even')); /* Check to see if we need to perform an update */ -if (!preg_match('/update\.php/', $_SERVER['PHP_SELF'])) { +if (!defined('OUTDATED_DATABASE_OK')) { if (Update::need_update()) { header("Location: " . Config::get('web_path') . "/update.php"); exit(); @@ -27,7 +27,8 @@ */ // We need this stuff -define('NO_SESSION','1'); +define('NO_SESSION', 1); +define('OUTDATED_DATABASE_OK', 1); require 'lib/init.php'; // Get the version and format it |