summaryrefslogtreecommitdiffstats
path: root/apis
diff options
context:
space:
mode:
authorSimon Rettberg2017-04-07 11:03:26 +0200
committerSimon Rettberg2017-04-07 11:03:26 +0200
commit60847a4a423a9e18bdfc226267191564702598c2 (patch)
treee6ebb7907a1f68498af7648e25824fb7ee1f6d05 /apis
parent[inc/Database] Add helper function to run INSERT and retrieve keys (diff)
downloadslx-admin-60847a4a423a9e18bdfc226267191564702598c2.tar.gz
slx-admin-60847a4a423a9e18bdfc226267191564702598c2.tar.xz
slx-admin-60847a4a423a9e18bdfc226267191564702598c2.zip
Check for module availability before calling it in legacy clientlog API
Diffstat (limited to 'apis')
-rw-r--r--apis/clientlog.inc.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/apis/clientlog.inc.php b/apis/clientlog.inc.php
index 81a7dbf7..b68e4632 100644
--- a/apis/clientlog.inc.php
+++ b/apis/clientlog.inc.php
@@ -10,7 +10,11 @@ if (empty($_POST['type'])) die('Missing options.');
$type = mb_strtolower($_POST['type']);
if ($type{0} === '~' || $type{0} === '.') {
- require 'modules/statistics/api.inc.php';
+ if (Module::isAvailable('statistics')) {
+ require 'modules/statistics/api.inc.php';
+ }
} else {
- require 'modules/syslog/api.inc.php';
+ if (Module::isAvailable('syslog')) {
+ require 'modules/syslog/api.inc.php';
+ }
}