summaryrefslogtreecommitdiffstats
path: root/modules-available
diff options
context:
space:
mode:
authorJannik Schönartz2017-12-28 18:22:19 +0100
committerJannik Schönartz2017-12-28 18:22:19 +0100
commit5a428cbde0b7648fd125f6de500e751ac5138402 (patch)
treef9e2288bd50f1b404ea814c2accbb0693c0121a6 /modules-available
parent[usb-lock-off] Code cleanup and removed code for the old db struct. (diff)
downloadslx-admin-5a428cbde0b7648fd125f6de500e751ac5138402.tar.gz
slx-admin-5a428cbde0b7648fd125f6de500e751ac5138402.tar.xz
slx-admin-5a428cbde0b7648fd125f6de500e751ac5138402.zip
[usb-lock-off] Fixed: Because of a missing uid every selected stick was adding the same id, name, serial etc. to the rules.conf.
Diffstat (limited to 'modules-available')
-rw-r--r--modules-available/usblockoff/page.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules-available/usblockoff/page.inc.php b/modules-available/usblockoff/page.inc.php
index f582cf92..d33765f0 100644
--- a/modules-available/usblockoff/page.inc.php
+++ b/modules-available/usblockoff/page.inc.php
@@ -220,7 +220,6 @@ class Page_usblockoff extends Page
'currentvalue' => $value)),
);
}
-
echo Render::parse('usb-device-list', array(
'list' => array_values($usbdevices),
'settings' => array_values($settings)
@@ -231,7 +230,7 @@ class Page_usblockoff extends Page
$usbdevices = array();
// TODO: Per USB Device 3 querys are executed.. better build a more complex sql query?
-
+ $uid = 0;
$dbquery = Database::simpleQuery("SELECT * FROM `usblockoff_hw`");
while ($entry = $dbquery->fetch(PDO::FETCH_ASSOC)) {
@@ -262,6 +261,7 @@ class Page_usblockoff extends Page
$device['location'] = $locationquery['name'];
}
+ $device['uid'] = ++$uid;
$device['id'] = $device['vendorid'] . ":" . $device['productid'];
$device['serial'] = $entry['serial'];
$device['date'] = date('d.m.Y', $device['lastseen']);