X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fpoke.php;h=848ed817d69d4b5ff0a846a8fe7b5b1f274ae4e2;hb=b8a76794e06f270b591bdc851c03ce3a6f4764ba;hp=45a577cda6bfd3764e9ac2d723112eea76df74f2;hpb=78a8db55c6cc4a0db21b442ebf1fc9d0f40ade6b;p=friendica.git diff --git a/mod/poke.php b/mod/poke.php index 45a577cda6..848ed817d6 100644 --- a/mod/poke.php +++ b/mod/poke.php @@ -1,45 +1,53 @@ -' . ACTIVITY_OBJ_PERSON . '' . $target['name'] . '' . $a->get_baseurl() . '/contact/' . $target['id'] . ''; + $arr['object'] = '' . ACTIVITY_OBJ_PERSON . '' . $target['name'] . '' . System::baseUrl() . '/contact/' . $target['id'] . ''; $arr['object'] .= '' . xmlify('' . "\n"); $arr['object'] .= xmlify('' . "\n"); @@ -126,26 +135,26 @@ function poke_init(&$a) { $item_id = item_store($arr); if($item_id) { //q("UPDATE `item` SET `plink` = '%s' WHERE `uid` = %d AND `id` = %d", - // dbesc($a->get_baseurl() . '/display/' . $poster['nickname'] . '/' . $item_id), + // dbesc(System::baseUrl() . '/display/' . $poster['nickname'] . '/' . $item_id), // intval($uid), // intval($item_id) //); - proc_run('php',"include/notifier.php","tag","$item_id"); + Worker::add(PRIORITY_HIGH, "notifier", "tag", $item_id); } call_hooks('post_local_end', $arr); - proc_run('php',"include/notifier.php","like","$post_id"); + Worker::add(PRIORITY_HIGH, "notifier", "like", $post_id); return; } -function poke_content(&$a) { +function poke_content(App $a) { - if(! local_user()) { + if (! local_user()) { notice( t('Permission denied.') . EOL); return; } @@ -158,18 +167,18 @@ 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']; } } - $base = $a->get_baseurl(); + $base = System::baseUrl(); $head_tpl = get_markup_template('poke_head.tpl'); $a->page['htmlhead'] .= replace_macros($head_tpl,array( - '$baseurl' => $a->get_baseurl(true), + '$baseurl' => System::baseUrl(true), '$base' => $base ));