summaryrefslogtreecommitdiffstats
path: root/modules-available/runmode
diff options
context:
space:
mode:
authorSimon Rettberg2018-01-11 11:19:14 +0100
committerSimon Rettberg2018-01-11 11:19:14 +0100
commit4537b9b7c9eb63bf3b2d5066d6c50e68f7de4956 (patch)
tree454c72e456ca01d5ab4a39114851737c9d7fc57c /modules-available/runmode
parent[translations] Focus first untranslated tag (diff)
downloadslx-admin-4537b9b7c9eb63bf3b2d5066d6c50e68f7de4956.tar.gz
slx-admin-4537b9b7c9eb63bf3b2d5066d6c50e68f7de4956.tar.xz
slx-admin-4537b9b7c9eb63bf3b2d5066d6c50e68f7de4956.zip
[statistics] Add "replace machines" feature (not linked to anywhere yet)
Diffstat (limited to 'modules-available/runmode')
-rw-r--r--modules-available/runmode/hooks/statistics-machine-replace.inc.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules-available/runmode/hooks/statistics-machine-replace.inc.php b/modules-available/runmode/hooks/statistics-machine-replace.inc.php
new file mode 100644
index 00000000..cd23e552
--- /dev/null
+++ b/modules-available/runmode/hooks/statistics-machine-replace.inc.php
@@ -0,0 +1,6 @@
+<?php
+
+foreach ($list as $entry) {
+ unset($entry['datelimit']);
+ Database::exec('UPDATE IGNORE runmode SET machineuuid = :new WHERE machineuuid = :old', $entry);
+}