diff options
Diffstat (limited to 'modules-available/syslog')
-rw-r--r-- | modules-available/syslog/api.inc.php | 2 | ||||
-rw-r--r-- | modules-available/syslog/page.inc.php | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/modules-available/syslog/api.inc.php b/modules-available/syslog/api.inc.php index da3e1519..3378afe6 100644 --- a/modules-available/syslog/api.inc.php +++ b/modules-available/syslog/api.inc.php @@ -25,7 +25,7 @@ if (($user = Request::post('export-user', false, 'string')) !== false) { unset($best); foreach ($srcs as &$src) { if (!isset($src['row'])) { - $src['row'] = $src['res']->fetch(PDO::FETCH_ASSOC); + $src['row'] = $src['res']->fetch(); } if ($src['row'] !== false && (!isset($best) || $src['row']['dateline'] < $best['dateline'])) { $best =& $src['row']; diff --git a/modules-available/syslog/page.inc.php b/modules-available/syslog/page.inc.php index 410a1ed7..71a07e14 100644 --- a/modules-available/syslog/page.inc.php +++ b/modules-available/syslog/page.inc.php @@ -61,7 +61,7 @@ class Page_SysLog extends Page WHERE dateline > $cutoff GROUP BY logtypeid ORDER BY counter ASC"); $types = array(); - while ($row = $res->fetch(PDO::FETCH_ASSOC)) { + foreach ($res as $row) { $types[$row['logtypeid']] = $row; } if (Request::get('filter') !== false || Request::get('search') !== false) { @@ -112,7 +112,7 @@ class Page_SysLog extends Page WHERE $whereClause ORDER BY logid DESC", 50); $res = $paginate->exec($qArgs); - while ($row = $res->fetch(PDO::FETCH_ASSOC)) { + foreach ($res as $row) { $row['date'] = Util::prettyTime($row['dateline']); $row['icon'] = $this->eventToIconName($row['logtypeid']); $lines[] = $row; |