X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fpoke.php;h=2f989dd7d3b07bd415847fe376034911b3be3ea9;hb=0b5f7da270bcaa679cb684dbbbbe40781f0b49c6;hp=db1c94963618f8acbe5f84e64d8b4a2acc8d4872;hpb=992684c3620185da00663e25eb1460c4b18920ea;p=friendica.git diff --git a/mod/poke.php b/mod/poke.php index db1c949636..2f989dd7d3 100644 --- a/mod/poke.php +++ b/mod/poke.php @@ -1,31 +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"); @@ -112,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; } @@ -140,44 +163,29 @@ function poke_content(&$a) { $id = ''; if(intval($_GET['c'])) { - $r = q("select id,name from contact where id = %d and uid = %d limit 1", + $r = q("SELECT `id`,`name` FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1", 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(); - $a->page['htmlhead'] .= ''; - $a->page['htmlhead'] .= <<< EOT - - -EOT; $parent = ((x($_GET,'parent')) ? intval($_GET['parent']) : '0'); - $verbs = get_poke_verbs(); $shortlist = array();