diff options
author | Simon Rettberg | 2015-01-26 20:28:49 +0100 |
---|---|---|
committer | Simon Rettberg | 2015-01-26 20:28:49 +0100 |
commit | 5347ecd5ddb1803ec1c43240bafc84f5c427f855 (patch) | |
tree | 7a852cdaa44599dab5f4c98b9daa7c6443d81024 /apis | |
parent | Fix stupid bug in update query, check DB version before handling callbacks (diff) | |
download | slx-admin-5347ecd5ddb1803ec1c43240bafc84f5c427f855.tar.gz slx-admin-5347ecd5ddb1803ec1c43240bafc84f5c427f855.tar.xz slx-admin-5347ecd5ddb1803ec1c43240bafc84f5c427f855.zip |
Add configtgz class. Fix dozens of bugs
Diffstat (limited to 'apis')
-rw-r--r-- | apis/update.inc.php | 12 |
1 files changed, 12 insertions, 0 deletions
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; } |