From eee3b4fbded1c797adb788e8710300e0b2a9c11a Mon Sep 17 00:00:00 2001 From: M.Gergő Date: Tue, 7 Apr 2020 00:21:24 +0200 Subject: Munin graphs for Nextcloud --- .description | 1 + nextcloud_munin.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 .description diff --git a/.description b/.description new file mode 100644 index 0000000..ec11c6d --- /dev/null +++ b/.description @@ -0,0 +1 @@ +Munin graphs for Nextcloud server \ No newline at end of file diff --git a/nextcloud_munin.php b/nextcloud_munin.php index 8675235..e0423f4 100644 --- a/nextcloud_munin.php +++ b/nextcloud_munin.php @@ -55,8 +55,8 @@ $time_req = time()-60*$set['diff_minutes']; $ret['data']['users_oos']['info'] = "Clients on other OS"; mysqli_set_charset($l, "utf8"); - $r = mysqli_query($l, "SELECT * FROM ".mysqli_real_escape($l, $set['db_db']).".".mysqli_real_escape($l, $set['db_prefix'])."authtoken - WHERE `last_activity` >= ".mysqli_real_escape($l, $time_req)." + $r = mysqli_query($l, "SELECT * FROM ".mysqli_real_escape_string($l, $set['db_db']).".".mysqli_real_escape_string($l, $set['db_prefix'])."authtoken + WHERE `last_activity` >= ".mysqli_real_escape_string($l, $time_req)." ORDER BY `last_activity` DESC ;" ); while ($row = mysqli_fetch_array($r, MYSQLI_ASSOC)) { -- cgit v1.2.3