summaryrefslogtreecommitdiffstats
path: root/modules-available/eventlog
diff options
context:
space:
mode:
authorSimon Rettberg2021-05-06 10:26:09 +0200
committerSimon Rettberg2021-05-11 14:51:13 +0200
commit8dc2b92d667f1401ab9f1315a36add61658f899c (patch)
tree452c5fe040055884cf9d9ee834415db84999a9a1 /modules-available/eventlog
parent[session] Add simple session overview table (diff)
downloadslx-admin-8dc2b92d667f1401ab9f1315a36add61658f899c.tar.gz
slx-admin-8dc2b92d667f1401ab9f1315a36add61658f899c.tar.xz
slx-admin-8dc2b92d667f1401ab9f1315a36add61658f899c.zip
Moderize Database handling
* Auto-convert to utf8mb4_unicode_520_ci * Use foreach instead of while to loop over results * Drop useless statement caching * Keep emulated prepares, as we sometimes loop over nested queries
Diffstat (limited to 'modules-available/eventlog')
-rw-r--r--modules-available/eventlog/page.inc.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules-available/eventlog/page.inc.php b/modules-available/eventlog/page.inc.php
index 1c81983c..250e1b24 100644
--- a/modules-available/eventlog/page.inc.php
+++ b/modules-available/eventlog/page.inc.php
@@ -16,7 +16,7 @@ class Page_EventLog extends Page
$lines = array();
$paginate = new Paginate("SELECT logid, dateline, logtypeid, description, extra FROM eventlog ORDER BY logid DESC", 50);
$res = $paginate->exec();
- while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
+ foreach ($res as $row) {
$row['date'] = Util::prettyTime($row['dateline']);
$row['icon'] = $this->typeToIcon($row['logtypeid']);
$row['color'] = $this->typeToColor($row['logtypeid']);