From: friendica Date: Fri, 20 Jul 2012 03:54:23 +0000 (-0700) Subject: allow to prefill - url/poke?f=&c=nn - nn is contact id X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d1243c9ad78ce75ca82f0c07829e9f277428c149;p=friendica.git allow to prefill - url/poke?f=&c=nn - nn is contact id --- diff --git a/mod/poke.php b/mod/poke.php index 851396e68b..f4660e624d 100644 --- a/mod/poke.php +++ b/mod/poke.php @@ -107,6 +107,21 @@ function poke_content(&$a) { return; } + $name = ''; + $id = ''; + + if(intval($_GET['c'])) { + $r = q("select id,name from contact where id = %d and uid = %d limit 1", + intval($_GET['c']), + intval(local_user()) + ); + if(count($r)) { + $name = $r[0]['name']; + $id = $r[0]['id']; + } + } + + $base = $a->get_baseurl(); $a->page['htmlhead'] .= ''; @@ -146,7 +161,9 @@ EOT; '$clabel' => t('Recipient'), '$choice' => t('Choose what you wish to do to recipient'), '$verbs' => $shortlist, - '$submit' => t('Submit') + '$submit' => t('Submit'), + '$name' => $name, + '$id' => $id )); return $o; diff --git a/view/poke_content.tpl b/view/poke_content.tpl index 09b3d8db43..f81d04c6c5 100644 --- a/view/poke_content.tpl +++ b/view/poke_content.tpl @@ -8,8 +8,8 @@
$clabel

- - + +