mv q() to DBA::select()
This commit is contained in:
parent
e5e87d546d
commit
0c873a0548
|
@ -154,14 +154,11 @@ class UserExport extends BaseSettingsModule
|
||||||
// write the table header (like Mastodon)
|
// write the table header (like Mastodon)
|
||||||
echo "Account address, Show boosts\n";
|
echo "Account address, Show boosts\n";
|
||||||
// get all the contacts
|
// get all the contacts
|
||||||
$query = sprintf("SELECT addr FROM `contact` WHERE `uid` = %d AND `self` = 0 AND rel IN (1,3) AND NOT `deleted`;", intval($_SESSION['uid']));
|
$contacts = DBA::select('contact', ['addr'], ['uid' => $_SESSION['uid'], 'self' => false, 'rel' => [1,3], 'deleted' => false]);
|
||||||
$contacts = q($query);
|
while ($contact = DBA::fetch($contacts)) {
|
||||||
if (DBA::isResult($contacts)) {
|
echo $contact['addr'] . ", true\n";
|
||||||
foreach ($contacts as $contact) {
|
|
||||||
// export row, set Show boosts to true
|
|
||||||
echo $contact['addr'] . ", true\n";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
DBA::close($contacts);
|
||||||
}
|
}
|
||||||
private static function exportAccount(App $a)
|
private static function exportAccount(App $a)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue