mirror of
https://github.com/friendica/friendica
synced 2025-04-25 15:10:13 +00:00
Update functions and calls
update function names and calls
This commit is contained in:
parent
a5b3f4b2ba
commit
33ac7a529f
4 changed files with 38 additions and 27 deletions
|
@ -8,6 +8,7 @@ use Friendica\Core\Cache;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Queue;
|
||||
use Friendica\Protocol\Diaspora;
|
||||
use Friendica\Protocol\DFRN;
|
||||
use Friendica\Protocol\PortableContact;
|
||||
|
@ -15,7 +16,6 @@ use Friendica\Protocol\Salmon;
|
|||
use dba;
|
||||
|
||||
require_once 'include/dba.php';
|
||||
require_once 'include/queue_fn.php';
|
||||
require_once 'include/datetime.php';
|
||||
require_once 'include/items.php';
|
||||
require_once 'include/bbcode.php';
|
||||
|
@ -75,7 +75,7 @@ class Queue
|
|||
|
||||
$contact = dba::selectFirst('contact', [], ['id' => $q_item['cid']]);
|
||||
if (!DBM::is_result($contact)) {
|
||||
remove_queue_item($q_item['id']);
|
||||
Queue::removeItem($q_item['id']);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ class Queue
|
|||
|
||||
if (!is_null($dead) && $dead) {
|
||||
logger('queue: skipping known dead url: ' . $contact['notify']);
|
||||
update_queue_time($q_item['id']);
|
||||
Queue::updateTime($q_item['id']);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -101,14 +101,14 @@ class Queue
|
|||
|
||||
if (!is_null($vital) && !$vital) {
|
||||
logger('queue: skipping dead server: ' . $server);
|
||||
update_queue_time($q_item['id']);
|
||||
Queue::updateTime($q_item['id']);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$user = dba::selectFirst('user', [], ['uid' => $contact['uid']]);
|
||||
if (!DBM::is_result($user)) {
|
||||
remove_queue_item($q_item['id']);
|
||||
Queue::removeItem($q_item['id']);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -124,10 +124,10 @@ class Queue
|
|||
$deliver_status = DFRN::deliver($owner, $contact, $data);
|
||||
|
||||
if ($deliver_status == (-1)) {
|
||||
update_queue_time($q_item['id']);
|
||||
Queue::updateTime($q_item['id']);
|
||||
Cache::set($cachekey_deadguy . $contact['notify'], true, CACHE_QUARTER_HOUR);
|
||||
} else {
|
||||
remove_queue_item($q_item['id']);
|
||||
Queue::removeItem($q_item['id']);
|
||||
}
|
||||
break;
|
||||
case NETWORK_OSTATUS:
|
||||
|
@ -136,10 +136,10 @@ class Queue
|
|||
$deliver_status = Salmon::slapper($owner, $contact['notify'], $data);
|
||||
|
||||
if ($deliver_status == (-1)) {
|
||||
update_queue_time($q_item['id']);
|
||||
Queue::updateTime($q_item['id']);
|
||||
Cache::set($cachekey_deadguy . $contact['notify'], true, CACHE_QUARTER_HOUR);
|
||||
} else {
|
||||
remove_queue_item($q_item['id']);
|
||||
Queue::removeItem($q_item['id']);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -149,10 +149,10 @@ class Queue
|
|||
$deliver_status = Diaspora::transmit($owner, $contact, $data, $public, true);
|
||||
|
||||
if ($deliver_status == (-1)) {
|
||||
update_queue_time($q_item['id']);
|
||||
Queue::updateTime($q_item['id']);
|
||||
Cache::set($cachekey_deadguy . $contact['notify'], true, CACHE_QUARTER_HOUR);
|
||||
} else {
|
||||
remove_queue_item($q_item['id']);
|
||||
Queue::removeItem($q_item['id']);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -162,9 +162,9 @@ class Queue
|
|||
call_hooks('queue_deliver', $params);
|
||||
|
||||
if ($params['result']) {
|
||||
remove_queue_item($q_item['id']);
|
||||
Queue::removeItem($q_item['id']);
|
||||
} else {
|
||||
update_queue_time($q_item['id']);
|
||||
Queue::updateTime($q_item['id']);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue