summaryrefslogtreecommitdiffstats
path: root/modules-available/syslog/install.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2019-07-03 09:19:57 +0200
committerSimon Rettberg2019-07-03 09:58:11 +0200
commit95da055fc5a82e5cc6c63df02b1993bda9b67634 (patch)
tree80966313aaaaa17c111780be39b6b29528f73229 /modules-available/syslog/install.inc.php
parent[locationinfo] fix bug 'open for' without times (diff)
downloadslx-admin-95da055fc5a82e5cc6c63df02b1993bda9b67634.tar.gz
slx-admin-95da055fc5a82e5cc6c63df02b1993bda9b67634.tar.xz
slx-admin-95da055fc5a82e5cc6c63df02b1993bda9b67634.zip
[install.php] tableHasIndex -> tableGetIndex
Diffstat (limited to 'modules-available/syslog/install.inc.php')
-rw-r--r--modules-available/syslog/install.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules-available/syslog/install.inc.php b/modules-available/syslog/install.inc.php
index d42a4e0e..2f306f9e 100644
--- a/modules-available/syslog/install.inc.php
+++ b/modules-available/syslog/install.inc.php
@@ -30,11 +30,11 @@ if (!tableHasColumn('clientlog', 'machineuuid')) {
}
// 2017-11-03: Create proper index for query in statistics module
-if (tableHasIndex('clientlog', ['machineuuid'])) {
+if (tableGetIndex('clientlog', ['machineuuid']) !== false) {
$r = Database::exec("ALTER TABLE `clientlog` DROP INDEX `machineuuid`");
$res[] = $r === false ? UPDATE_FAILED : UPDATE_DONE;
}
-if (!tableHasIndex('clientlog', ['machineuuid', 'logid'])) {
+if (tableGetIndex('clientlog', ['machineuuid', 'logid']) === false) {
$r = Database::exec("ALTER TABLE `clientlog`
ADD INDEX `machineuuid` ( `machineuuid` , `logid` )");
$res[] = $r === false ? UPDATE_FAILED : UPDATE_DONE;