X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fpoke.php;h=2e15ed853ff395be7363279c8d9499871d3348a4;hb=061bcd7d2fcfb8da18e63ed4fde436b38463539d;hp=0619a34e07535a2682466729d5d3c1ca3143aa8b;hpb=884f44ce94de8fdf26a40751dfd4b61b29765d29;p=friendica.git diff --git a/mod/poke.php b/mod/poke.php index 0619a34e07..2e15ed853f 100644 --- a/mod/poke.php +++ b/mod/poke.php @@ -19,27 +19,31 @@ require_once('include/bbcode.php'); require_once('include/items.php'); -function poke_init(&$a) { +function poke_init(App &$a) { - if(! local_user()) + if (! local_user()) { return; + } $uid = local_user(); $verb = notags(trim($_GET['verb'])); - if(! $verb) + if (! $verb) { return; + } $verbs = get_poke_verbs(); - if(! array_key_exists($verb,$verbs)) + if (! array_key_exists($verb,$verbs)) { return; + } $activity = ACTIVITY_POKE . '#' . urlencode($verbs[$verb][0]); $contact_id = intval($_GET['cid']); - if(! $contact_id) + if (! $contact_id) { return; + } $parent = ((x($_GET,'parent')) ? intval($_GET['parent']) : 0); @@ -52,7 +56,7 @@ function poke_init(&$a) { intval($uid) ); - if(! dbm::is_result($r)) { + if (! dbm::is_result($r)) { logger('poke: no contact ' . $contact_id); return; } @@ -144,9 +148,9 @@ function poke_init(&$a) { -function poke_content(&$a) { +function poke_content(App &$a) { - if(! local_user()) { + if (! local_user()) { notice( t('Permission denied.') . EOL); return; }