summaryrefslogtreecommitdiffstats
path: root/modules-available/roomplanner/install.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2016-09-08 18:45:16 +0200
committerSimon Rettberg2016-09-08 18:45:16 +0200
commit6210a5bff6504303afefd10728d71c2fdf047812 (patch)
tree8572693a2b67b67105f716425f5615a3d96d596b /modules-available/roomplanner/install.inc.php
parent[session] Add simple "change password" GUI (diff)
downloadslx-admin-6210a5bff6504303afefd10728d71c2fdf047812.tar.gz
slx-admin-6210a5bff6504303afefd10728d71c2fdf047812.tar.xz
slx-admin-6210a5bff6504303afefd10728d71c2fdf047812.zip
[roomplanner] Add option to enable/disable pvsmgr dedicated mode
In dedicated mode, the pvsmgr will skip login/vmchooser and directly open the pvsmgr
Diffstat (limited to 'modules-available/roomplanner/install.inc.php')
-rw-r--r--modules-available/roomplanner/install.inc.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/modules-available/roomplanner/install.inc.php b/modules-available/roomplanner/install.inc.php
index 0a6c3729..a6d98384 100644
--- a/modules-available/roomplanner/install.inc.php
+++ b/modules-available/roomplanner/install.inc.php
@@ -6,19 +6,21 @@ $res = array();
$res[] = tableCreate('location_roomplan', "
`locationid` INT(11) NOT NULL,
`managerip` varchar(45) CHARACTER SET ascii DEFAULT '',
+ `dedicatedmgr` tinyint(1) NOT NULL DEFAULT 0,
`tutoruuid` char(36) CHARACTER SET ascii DEFAULT NULL,
`roomplan` BLOB DEFAULT NULL,
PRIMARY KEY (`locationid`),
- KEY `tutoruuid` (`tutoruuid`)");
+ KEY `tutoruuid` (`tutoruuid`),
+ KEY `managerip` (`managerip`)");
if (!tableHasColumn('location_roomplan', 'managerip')) {
- $ret = Database::exec("ALTER TABLE `location_roomplan` ADD COLUMN `managerip` varchar(45) CHARACTER SET ascii DEFAULT '' AFTER locationid") !== false;
+ $ret = Database::exec("ALTER TABLE `location_roomplan` ADD COLUMN `managerip` varchar(45) CHARACTER SET ascii DEFAULT '' AFTER locationid,"
+ . " ADD KEY `managerip` (`managerip`)") !== false;
if ($ret === false) {
finalResponse(UPDATE_FAILED, 'Adding managerip to location_roomplan failed: ' . Database::lastError());
}
$res[] = UPDATE_DONE;
}
-
if (!tableHasColumn('location_roomplan', 'tutoruuid')) {
$ret = Database::exec("ALTER TABLE `location_roomplan` ADD COLUMN `tutoruuid` char(36) CHARACTER SET ascii DEFAULT NULL AFTER managerip,"
. " ADD KEY `tutoruuid` (`tutoruuid`)") !== false;
@@ -27,6 +29,13 @@ if (!tableHasColumn('location_roomplan', 'tutoruuid')) {
}
$res[] = UPDATE_DONE;
}
+if (!tableHasColumn('location_roomplan', 'dedicatedmgr')) {
+ $ret = Database::exec("ALTER TABLE `location_roomplan` ADD `dedicatedmgr` tinyint(1) NOT NULL DEFAULT 0 AFTER `managerip`") !== false;
+ if ($ret === false) {
+ finalResponse(UPDATE_FAILED, 'Adding dedicatedmgr to location_roomplan failed: ' . Database::lastError());
+ }
+ $res[] = UPDATE_DONE;
+}
if (in_array(UPDATE_DONE, $res)) {
Database::exec("ALTER TABLE `location_roomplan`