summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2019-03-15 10:35:20 +0100
committerSimon Rettberg2019-03-15 10:35:20 +0100
commit46a0888f134f63d12f80d072b6f237e63d6c9f46 (patch)
treeaf90be5bbcfc5154ec3a5897e11fcc4d0e6a59c6
parent[locationinfo] Add black/whitelist stuff for URL panels (diff)
downloadslx-admin-46a0888f134f63d12f80d072b6f237e63d6c9f46.tar.gz
slx-admin-46a0888f134f63d12f80d072b6f237e63d6c9f46.tar.xz
slx-admin-46a0888f134f63d12f80d072b6f237e63d6c9f46.zip
[locationinfo] Purge old log entries form backend log
-rw-r--r--modules-available/locationinfo/hooks/cron.inc.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules-available/locationinfo/hooks/cron.inc.php b/modules-available/locationinfo/hooks/cron.inc.php
new file mode 100644
index 00000000..24d4c466
--- /dev/null
+++ b/modules-available/locationinfo/hooks/cron.inc.php
@@ -0,0 +1,5 @@
+<?php
+
+$cutoff = time() - 86400 * 30;
+Database::exec('DELETE FROM locationinfo_backendlog WHERE dateline < :cutoff',
+ compact('cutoff')); \ No newline at end of file