Fix undefined variable/wrong parameter count/unknown functions

This commit is contained in:
Hypolite Petovan 2017-12-17 15:31:37 -05:00
parent 4b5894817e
commit 2978b1eef0
16 changed files with 36 additions and 33 deletions

View file

@ -18,7 +18,7 @@ Class CronHooks {
foreach ($a->hooks["cron"] as $single_hook) {
if ($single_hook[1] == $hook) {
logger("Calling cron hook '" . $hook . "'", LOGGER_DEBUG);
call_single_hook($a, $name, $single_hook, $data);
call_single_hook($a, $hook, $single_hook);
}
}
return;

View file

@ -50,7 +50,7 @@ class Expire {
foreach ($a->hooks["expire"] as $hook) {
if ($hook[1] == $hook_name) {
logger("Calling expire hook '" . $hook[1] . "'", LOGGER_DEBUG);
call_single_hook($a, $name, $hook, $data);
call_single_hook($a, $hook_name, $hook, $data);
}
}
return;

View file

@ -631,6 +631,7 @@ Class OnePoll
dba::update('gcontact', array('last_failure' => $updated), array('nurl' => $contact['nurl']));
Contact::markForArchival($contact);
} else {
$updated = datetime_convert();
dba::update('contact', array('last-update' => $updated), array('id' => $contact['id']));
}

View file

@ -55,7 +55,7 @@ class Queue
*/
$r = q("SELECT `id` FROM `queue` WHERE ((`created` > UTC_TIMESTAMP() - INTERVAL 12 HOUR AND `last` < UTC_TIMESTAMP() - INTERVAL 15 MINUTE) OR (`last` < UTC_TIMESTAMP() - INTERVAL 1 HOUR)) ORDER BY `cid`, `created`");
call_hooks('queue_predeliver', $a, $r);
call_hooks('queue_predeliver', $r);
if (DBM::is_result($r)) {
foreach ($r as $q_item) {
@ -166,7 +166,7 @@ class Queue
default:
$params = array('owner' => $owner, 'contact' => $contact, 'queue' => $q_item, 'result' => false);
call_hooks('queue_deliver', $a, $params);
call_hooks('queue_deliver', $params);
if ($params['result']) {
remove_queue_item($q_item['id']);