summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/install.inc.php
diff options
context:
space:
mode:
authorJannik Schönartz2016-11-26 20:33:20 +0100
committerJannik Schönartz2016-11-26 20:33:20 +0100
commitebe2b84fa451bb1e72b5618879a5495d4dc1e4ed (patch)
treef9bf4307e75537c7616647fd3279e8116fcda6a9 /modules-available/locationinfo/install.inc.php
parentMerge branch 'location-info-panel' of git.openslx.org:openslx-ng/slx-admin in... (diff)
downloadslx-admin-ebe2b84fa451bb1e72b5618879a5495d4dc1e4ed.tar.gz
slx-admin-ebe2b84fa451bb1e72b5618879a5495d4dc1e4ed.tar.xz
slx-admin-ebe2b84fa451bb1e72b5618879a5495d4dc1e4ed.zip
Fixed a coordination bug which caused rotation bugs. Deleted the locationinfo db and added a setting_location_info all in the install.php
Diffstat (limited to 'modules-available/locationinfo/install.inc.php')
-rw-r--r--modules-available/locationinfo/install.inc.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/modules-available/locationinfo/install.inc.php b/modules-available/locationinfo/install.inc.php
index f4eaee1f..f94c725e 100644
--- a/modules-available/locationinfo/install.inc.php
+++ b/modules-available/locationinfo/install.inc.php
@@ -11,8 +11,25 @@ $res[] = tableCreate('location_info', '
PRIMARY KEY (`locationid`)
');
+$res[] = tableCreate('setting_location_info', '
+ `serverid` int(10) NOT NULL AUTO_INCREMENT,
+ `serverurl` VARCHAR(2000) NOT NULL,
+ `servertype` VARCHAR(100) NOT NULL,
+ `login` VARCHAR(100) NOT NULL,
+ `passwd` VARCHAR(150) NOT NULL,
+ PRIMARY KEY (`serverid`)
+');
+
// Create response for browser
+if(tableExists('locationinfo')) {
+ $ret = Database::exec("DROP TABLE `locationinfo`");
+ if ($ret === false) {
+ finalResponse(UPDATE_FAILED, 'Droping table locationinfo failed: ' . Database::lastError());
+ }
+ $res[] = UPDATE_DONE;
+}
+
if (!tableHasColumn('location_info', 'config')) {
$ret = Database::exec("ALTER TABLE `location_info` ADD `config` VARCHAR(2000) NOT NULL DEFAULT '' AFTER `openingtime`");
if ($ret === false) {