X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fpoke.php;h=5161129b31c38f2c9dec070cd98f4b290a75e2fa;hb=5b80a1fcaa04e96992cc54c27e8437a88df591f1;hp=db1c94963618f8acbe5f84e64d8b4a2acc8d4872;hpb=ed1dce93d688cc6917348cac955e2b3a159215b9;p=friendica.git diff --git a/mod/poke.php b/mod/poke.php index db1c949636..5161129b31 100644 --- a/mod/poke.php +++ b/mod/poke.php @@ -1,31 +1,49 @@ -' . ACTIVITY_OBJ_PERSON . '' . $target['name'] . '' . $a->get_baseurl() . '/contact/' . $target['id'] . ''; + $arr['object'] = '' . ACTIVITY_OBJ_PERSON . '' . $target['name'] . '' . App::get_baseurl() . '/contact/' . $target['id'] . ''; $arr['object'] .= '' . xmlify('' . "\n"); $arr['object'] .= xmlify('' . "\n"); @@ -112,26 +131,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(App::get_baseurl() . '/display/' . $poster['nickname'] . '/' . $item_id), // 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; } -function poke_content(&$a) { +function poke_content(App $a) { - if(! local_user()) { + if (! local_user()) { notice( t('Permission denied.') . EOL); return; } @@ -140,44 +159,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(); - - $a->page['htmlhead'] .= ''; - $a->page['htmlhead'] .= <<< EOT + $base = App::get_baseurl(); - -EOT; $parent = ((x($_GET,'parent')) ? intval($_GET['parent']) : '0'); - $verbs = get_poke_verbs(); $shortlist = array();