]> git.mxchange.org Git - friendica.git/blobdiff - include/queue.php
Make sure that we only quit when we are sure we can
[friendica.git] / include / queue.php
index 8f57bf3d7247176f520389c3cd2956d135dd833d..bcd32985db890d2ea1d36f3e495e2a9278f66ea5 100644 (file)
@@ -1,4 +1,7 @@
 <?php
+
+use \Friendica\Core\Config;
+
 require_once("boot.php");
 require_once('include/queue_fn.php');
 require_once('include/dfrn.php');
@@ -23,8 +26,7 @@ function queue_run(&$argv, &$argc){
        require_once('include/bbcode.php');
        require_once('include/socgraph.php');
 
-       load_config('config');
-       load_config('system');
+       Config::load();
 
        // Don't check this stuff if the function is called by the poller
        if (App::callstack() != "poller_run")
@@ -127,7 +129,7 @@ function queue_run(&$argv, &$argc){
                $c = q("SELECT * FROM `contact` WHERE `id` = %d LIMIT 1",
                        intval($qi[0]['cid'])
                );
-               if(! count($c)) {
+               if (! dbm::is_result($c)) {
                        remove_queue_item($q_item['id']);
                        continue;
                }
@@ -157,7 +159,7 @@ function queue_run(&$argv, &$argc){
                        FROM `user` WHERE `uid` = %d LIMIT 1",
                        intval($c[0]['uid'])
                );
-               if(! count($u)) {
+               if (! dbm::is_result($u)) {
                        remove_queue_item($q_item['id']);
                        continue;
                }
@@ -196,7 +198,7 @@ function queue_run(&$argv, &$argc){
                        case NETWORK_DIASPORA:
                                if($contact['notify']) {
                                        logger('queue: diaspora_delivery: item '.$q_item['id'].' for '.$contact['name'].' <'.$contact['url'].'>');
-                                       $deliver_status = diaspora::transmit($owner,$contact,$data,$public,true);
+                                       $deliver_status = Diaspora::transmit($owner,$contact,$data,$public,true);
 
                                        if($deliver_status == (-1)) {
                                                update_queue_time($q_item['id']);