diff options
author | Simon Rettberg | 2017-04-07 11:03:26 +0200 |
---|---|---|
committer | Simon Rettberg | 2017-04-07 11:03:26 +0200 |
commit | 60847a4a423a9e18bdfc226267191564702598c2 (patch) | |
tree | e6ebb7907a1f68498af7648e25824fb7ee1f6d05 /apis | |
parent | [inc/Database] Add helper function to run INSERT and retrieve keys (diff) | |
download | slx-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.php | 8 |
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'; + } } |