]> git.mxchange.org Git - friendica.git/blobdiff - mod/poke.php
Merge pull request #4243 from MrPetovan/task/switch-to-array-new-style
[friendica.git] / mod / poke.php
index ca02b6bee5105880b62a21ceff5216dec289d611..8b36b17dceb0f6c0952a3efbcf00a5b053655277 100644 (file)
@@ -16,6 +16,8 @@
 
 use Friendica\App;
 use Friendica\Core\System;
+use Friendica\Core\Worker;
+use Friendica\Database\DBM;
 
 require_once('include/security.php');
 require_once('include/bbcode.php');
@@ -58,7 +60,7 @@ function poke_init(App $a) {
                intval($uid)
        );
 
-       if (! dbm::is_result($r)) {
+       if (! DBM::is_result($r)) {
                logger('poke: no contact ' . $contact_id);
                return;
        }
@@ -72,7 +74,7 @@ function poke_init(App $a) {
                        intval($parent),
                        intval($uid)
                );
-               if (dbm::is_result($r)) {
+               if (DBM::is_result($r)) {
                        $parent_uri = $r[0]['uri'];
                        $private    = $r[0]['private'];
                        $allow_cid  = $r[0]['allow_cid'];
@@ -95,7 +97,7 @@ function poke_init(App $a) {
 
        $uri = item_new_uri($a->get_hostname(),$uid);
 
-       $arr = array();
+       $arr = [];
 
        $arr['guid']          = get_guid(32);
        $arr['uid']           = $uid;
@@ -137,13 +139,13 @@ function poke_init(App $a) {
                //      intval($uid),
                //      intval($item_id)
                //);
-               proc_run(PRIORITY_HIGH, "include/notifier.php", "tag", $item_id);
+               Worker::add(PRIORITY_HIGH, "Notifier", "tag", $item_id);
        }
 
 
        call_hooks('post_local_end', $arr);
 
-       proc_run(PRIORITY_HIGH, "include/notifier.php", "like", $post_id);
+       Worker::add(PRIORITY_HIGH, "Notifier", "like", $post_id);
 
        return;
 }
@@ -165,7 +167,7 @@ function poke_content(App $a) {
                        intval($_GET['c']),
                        intval(local_user())
                );
-               if (dbm::is_result($r)) {
+               if (DBM::is_result($r)) {
                        $name = $r[0]['name'];
                        $id = $r[0]['id'];
                }
@@ -175,10 +177,10 @@ function poke_content(App $a) {
        $base = System::baseUrl();
 
        $head_tpl = get_markup_template('poke_head.tpl');
-       $a->page['htmlhead'] .= replace_macros($head_tpl,array(
+       $a->page['htmlhead'] .= replace_macros($head_tpl,[
                '$baseurl' => System::baseUrl(true),
                '$base' => $base
-       ));
+       ]);
 
 
        $parent = ((x($_GET,'parent')) ? intval($_GET['parent']) : '0');
@@ -186,15 +188,15 @@ function poke_content(App $a) {
 
        $verbs = get_poke_verbs();
 
-       $shortlist = array();
+       $shortlist = [];
        foreach($verbs as $k => $v)
                if($v[1] !== 'NOTRANSLATION')
-                       $shortlist[] = array($k,$v[1]);
+                       $shortlist[] = [$k,$v[1]];
 
 
        $tpl = get_markup_template('poke_content.tpl');
 
-       $o = replace_macros($tpl,array(
+       $o = replace_macros($tpl,[
                '$title' => t('Poke/Prod'),
                '$desc' => t('poke, prod or do other things to somebody'),
                '$clabel' => t('Recipient'),
@@ -205,7 +207,7 @@ function poke_content(App $a) {
                '$submit' => t('Submit'),
                '$name' => $name,
                '$id' => $id
-       ));
+       ]);
 
        return $o;