mirror of
https://github.com/friendica/friendica
synced 2025-04-22 19:10:12 +00:00
Improve dba::selectFirst calls
- Fix remaining $r[0] references - Rename $r to meaningful names
This commit is contained in:
parent
465e1d6a5c
commit
5fc4927764
29 changed files with 228 additions and 250 deletions
|
@ -68,18 +68,11 @@ class Queue
|
|||
|
||||
|
||||
// delivering
|
||||
|
||||
$r = q(
|
||||
"SELECT * FROM `queue` WHERE `id` = %d LIMIT 1",
|
||||
intval($queue_id)
|
||||
);
|
||||
|
||||
if (!DBM::is_result($r)) {
|
||||
$q_item = dba::selectFirst('queue', [], ['id' => $queue_id]);
|
||||
if (!DBM::is_result($q_item)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$q_item = $r[0];
|
||||
|
||||
$contact = dba::selectFirst('contact', [], ['id' => $q_item['cid']]);
|
||||
if (!DBM::is_result($contact)) {
|
||||
remove_queue_item($q_item['id']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue