summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/install.inc.php
diff options
context:
space:
mode:
authorJannik Schönartz2017-03-09 00:23:56 +0100
committerJannik Schönartz2017-03-09 00:23:56 +0100
commit326766e9ce7caeaa653cb2bac20962d1147a7e6a (patch)
treefa48f4e8530dc64cabb4a48c04bde9149ba62155 /modules-available/locationinfo/install.inc.php
parentfrontend: fixed vertical mode in doorsign (diff)
downloadslx-admin-326766e9ce7caeaa653cb2bac20962d1147a7e6a.tar.gz
slx-admin-326766e9ce7caeaa653cb2bac20962d1147a7e6a.tar.xz
slx-admin-326766e9ce7caeaa653cb2bac20962d1147a7e6a.zip
Locationinfo: Errors from the CourseBackend are now safes in the db and shown in the Admin-Panel. Refresh-button added for the servers. Install.php needs to be executed!
Diffstat (limited to 'modules-available/locationinfo/install.inc.php')
-rw-r--r--modules-available/locationinfo/install.inc.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/modules-available/locationinfo/install.inc.php b/modules-available/locationinfo/install.inc.php
index c6e8f1f3..a371ad02 100644
--- a/modules-available/locationinfo/install.inc.php
+++ b/modules-available/locationinfo/install.inc.php
@@ -19,11 +19,20 @@ $res[] = tableCreate('setting_location_info', '
`servername` VARCHAR(2000) NOT NULL,
`serverurl` VARCHAR(2000) NOT NULL,
`servertype` VARCHAR(100) NOT NULL,
- `auth` VARCHAR(100) NOT NULL,
+ `credentials` VARCHAR(2000),
+ `error` VARCHAR(2000),
PRIMARY KEY (`serverid`)
');
// Create response for browser
+if (!tableHasColumn('setting_location_info', 'error')) {
+ $ret = Database::exec("ALTER TABLE `setting_location_info` ADD `error` VARCHAR(2000) AFTER `credentials`");
+ if ($ret === false) {
+ finalResponse(UPDATE_FAILED, 'Adding column error failed: ' . Database::lastError());
+ }
+ $res[] = UPDATE_DONE;
+}
+
if (!tableHasColumn('setting_location_info', 'credentials')) {
$ret = Database::exec("ALTER TABLE `setting_location_info` ADD `credentials` VARCHAR(2000) AFTER `servertype`");
if ($ret === false) {