From 326766e9ce7caeaa653cb2bac20962d1147a7e6a Mon Sep 17 00:00:00 2001 From: Jannik Schönartz Date: Thu, 9 Mar 2017 00:23:56 +0100 Subject: 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! --- modules-available/locationinfo/install.inc.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'modules-available/locationinfo/install.inc.php') 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) { -- cgit v1.2.3-55-g7522