summaryrefslogtreecommitdiffstats
path: root/modules-available/usblockoff/install.inc.php
diff options
context:
space:
mode:
authorChristian Hofmaier2018-03-20 15:35:18 +0100
committerChristian Hofmaier2018-03-20 15:35:18 +0100
commitd2862870c0ecd1e4855db1b0ec3a455fed876af1 (patch)
treebc6b63b27bc88055435a73ef05c0223768becec3 /modules-available/usblockoff/install.inc.php
parent[usb-lock-off] tooltip that first matching rule (from top to bottom) is applied (diff)
downloadslx-admin-d2862870c0ecd1e4855db1b0ec3a455fed876af1.tar.gz
slx-admin-d2862870c0ecd1e4855db1b0ec3a455fed876af1.tar.xz
slx-admin-d2862870c0ecd1e4855db1b0ec3a455fed876af1.zip
[usb-lock-off] now you can add a description which is shown on the front page, edited database, added template tags, made nice red-flag for missing input name :)
Diffstat (limited to 'modules-available/usblockoff/install.inc.php')
-rw-r--r--modules-available/usblockoff/install.inc.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules-available/usblockoff/install.inc.php b/modules-available/usblockoff/install.inc.php
index cf260c61..47a07573 100644
--- a/modules-available/usblockoff/install.inc.php
+++ b/modules-available/usblockoff/install.inc.php
@@ -16,7 +16,7 @@ $t2 = $res[] = tableCreate('usblockoff_hw_prop', '
PRIMARY KEY (`hwid`, `serial`, `prop`)
');
-$res[] = tableCreate('usb_configs', '
+$t4 = $res[] = tableCreate('usb_configs', '
`configid` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`configname` VARCHAR(200) NOT NULL,
`rulesconfig` VARCHAR(512),
@@ -60,6 +60,11 @@ if ($t1 === UPDATE_DONE || $t2 === UPDATE_DONE) {
$res[] = UPDATE_DONE;
}
+if ($t4 === UPDATE_NOOP) {
+ Database::exec("ALTER TABLE `usb_configs`
+ ADD `configdesc` VARCHAR(200)");
+}
+
if (in_array(UPDATE_DONE, $res)) {
finalResponse(UPDATE_DONE, 'Table created successfully');