From: Tobias Diekershoff Date: Sat, 2 Nov 2019 11:12:29 +0000 (+0100) Subject: mv q() to DBA::p() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=34932e12bf42878c86bb7df6b1cc978746d7f1b0;p=friendica.git mv q() to DBA::p() --- diff --git a/src/Module/Settings/UserExport.php b/src/Module/Settings/UserExport.php index 2a19d5f208..d6cd0aabf1 100644 --- a/src/Module/Settings/UserExport.php +++ b/src/Module/Settings/UserExport.php @@ -88,23 +88,22 @@ class UserExport extends BaseSettingsModule $table = $match[1]; $result = []; - $r = q($query); - if (DBA::isResult($r)) { - foreach ($r as $rr) { - $p = []; - foreach ($rr as $k => $v) { - switch ($dbStructure[$table]['fields'][$k]['type']) { - case 'datetime': - $p[$k] = $v ?? DBA::NULL_DATETIME; - break; - default: - $p[$k] = $v; - break; - } + $rows = DBA::p($query); + while ($row = DBA::fetch($rows)) { + $p = []; + foreach ($row as $k => $v) { + switch ($dbStructure[$table]['fields'][$k]['type']) { + case 'datetime': + $p[$k] = $v ?? DBA::NULL_DATETIME; + break; + default: + $p[$k] = $v; + break; } - $result[] = $p; } + $result[] = $p; } + DBA::close($rows); return $result; }