From 5347ecd5ddb1803ec1c43240bafc84f5c427f855 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 26 Jan 2015 20:28:49 +0100 Subject: Add configtgz class. Fix dozens of bugs --- apis/update.inc.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'apis') diff --git a/apis/update.inc.php b/apis/update.inc.php index 13a5f593..ac680aef 100644 --- a/apis/update.inc.php +++ b/apis/update.inc.php @@ -39,6 +39,16 @@ while ($currentVersion < $targetVersion) { } } +// 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"); @@ -209,5 +219,7 @@ function update_8() Database::exec("ALTER TABLE `configtgz_module` ADD `status` ENUM( 'OK', 'MISSING', 'OUTDATED' ) NOT NULL DEFAULT 'MISSING'"); if (!tableHasColumn('callback', 'args')) Database::exec("ALTER TABLE `callback` ADD `args` TEXT NOT NULL DEFAULT ''"); + if (!tableHasColumn('configtgz', 'status')) + Database::exec("ALTER TABLE `configtgz` ADD `status` ENUM( 'OK', 'OUTDATED', 'MISSING' ) NOT NULL DEFAULT 'MISSING'"); return true; } -- cgit v1.2.3-55-g7522