]> git.mxchange.org Git - friendica.git/blobdiff - mod/poke.php
More usage of dbm::is_result($r) instead of count($r):
[friendica.git] / mod / poke.php
index 45a577cda6bfd3764e9ac2d723112eea76df74f2..af5dacabc153f220889834fe75fe9bf3cea4f029 100644 (file)
@@ -52,7 +52,7 @@ function poke_init(&$a) {
                intval($uid)
        );
 
-       if(! count($r)) {
+       if(! dbm::is_result($r)) {
                logger('poke: no contact ' . $contact_id);
                return;
        }
@@ -66,7 +66,7 @@ function poke_init(&$a) {
                        intval($parent),
                        intval($uid)
                );
-               if(count($r)) {
+               if(dbm::is_result($r)) {
                        $parent_uri = $r[0]['uri'];
                        $private    = $r[0]['private'];
                        $allow_cid  = $r[0]['allow_cid'];
@@ -91,6 +91,7 @@ function poke_init(&$a) {
 
        $arr = array();
 
+       $arr['guid']          = get_guid(32);
        $arr['uid']           = $uid;
        $arr['uri']           = $uri;
        $arr['parent-uri']    = (($parent_uri) ? $parent_uri : $uri);
@@ -130,13 +131,13 @@ function poke_init(&$a) {
                //      intval($uid),
                //      intval($item_id)
                //);
-               proc_run('php',"include/notifier.php","tag","$item_id");
+               proc_run(PRIORITY_HIGH, "include/notifier.php", "tag", $item_id);
        }
 
 
        call_hooks('post_local_end', $arr);
 
-       proc_run('php',"include/notifier.php","like","$post_id");
+       proc_run(PRIORITY_HIGH, "include/notifier.php", "like", $post_id);
 
        return;
 }
@@ -158,7 +159,7 @@ function poke_content(&$a) {
                        intval($_GET['c']),
                        intval(local_user())
                );
-               if(count($r)) {
+               if(dbm::is_result($r)) {
                        $name = $r[0]['name'];
                        $id = $r[0]['id'];
                }