From 8232db1461a302aaeecabd88228786d5d86c39c5 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 4 Jul 2016 14:10:29 +0200 Subject: delete update.inc.php: Not used anymore --- apis/update.inc.php | 59 ----------------------------------------------------- 1 file changed, 59 deletions(-) delete mode 100644 apis/update.inc.php (limited to 'apis') diff --git a/apis/update.inc.php b/apis/update.inc.php deleted file mode 100644 index d3262eb3..00000000 --- a/apis/update.inc.php +++ /dev/null @@ -1,59 +0,0 @@ -= $targetVersion) - die('Up to date :-)'); - -while ($currentVersion < $targetVersion) { - - $function = 'update_' . $currentVersion; - - if (!function_exists($function)) - fatal("Don't know how to update from version $currentVersion to $targetVersion :-("); - - if (!$function()) - fatal("Update from $currentVersion to $targetVersion failed! :-("); - - $currentVersion++; - - $ret = Database::exec("INSERT INTO property (name, value) VALUES ('webif-version', :version) ON DUPLICATE KEY UPDATE value = VALUES(value)", array('version' => $currentVersion), false); - if ($ret === false) - fatal('Writing version information back to DB failed. Next update will probably break.'); - - if ($currentVersion < $targetVersion) { - echo("Updated to $currentVersion...\n"); - } -} - -// TEMPORARY HACK; Rebuild AD configs.. move somewhere else -$list = ConfigModule::getAll('AdAuth'); -if ($list === false) { - Message::addError('ad-config-failed'); -} else { - foreach ($list as $ad) { - $ad->generate(false); - } -} - -Message::addSuccess('db-update-done'); -if (tableExists('eventlog')) - EventLog::info("Database updated to version $currentVersion"); -Util::redirect('index.php?do=Main'); -- cgit v1.2.3-55-g7522