[Scrutinizer] Fix undeclared variables in src/ (except Protocol/)

- Use dba::selectFirst to remove intermediate variables `$r`
- Remove unused variable `$url_recipients` in Worker\Dellivery
This commit is contained in:
Hypolite Petovan 2018-02-14 00:05:00 -05:00
parent 2234bb92ae
commit d419d07f73
17 changed files with 89 additions and 81 deletions

View file

@ -67,6 +67,7 @@ class Notifier {
$url_recipients = [];
$normal_mode = true;
$recipients_relocate = [];
if ($cmd === 'mail') {
$normal_mode = false;
@ -178,6 +179,10 @@ class Notifier {
// fill this in with a single salmon slap if applicable
$slap = '';
$followup = false;
$recipients_followup = [];
$conversants = [];
$sql_extra = '';
if (! ($mail || $fsuggest || $relocate)) {
$slap = OStatus::salmon($target_item, $owner);
@ -321,8 +326,6 @@ class Notifier {
Worker::add($a->queue['priority'], 'Notifier', 'uplink', $item_id);
}
$conversants = [];
foreach ($items as $item) {
$recipients[] = $item['contact-id'];
$conversants[] = $item['contact-id'];
@ -519,7 +522,7 @@ class Notifier {
// except for Diaspora batch jobs
// Don't deliver to folks who have already been delivered to
if (($rr['network'] !== NETWORK_DIASPORA) && (in_array($rr['id'],$conversants))) {
if (($rr['network'] !== NETWORK_DIASPORA) && (in_array($rr['id'], $conversants))) {
logger('notifier: already delivered id=' . $rr['id']);
continue;
}