aboutsummaryrefslogtreecommitdiffstats
path: root/mod/poke.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-21 03:48:59 -0700
committerfriendica <info@friendica.com>2012-07-21 03:48:59 -0700
commit6e08f398200de8a1560e14cdb4fb6c278a8e2b94 (patch)
tree9ca6e1e6350ba49b8f3abc130c9551afe7fa436d /mod/poke.php
parentbf386749047731d3a7f47fd99f7dcc4e93ed7be7 (diff)
downloadvolse-hubzilla-6e08f398200de8a1560e14cdb4fb6c278a8e2b94.tar.gz
volse-hubzilla-6e08f398200de8a1560e14cdb4fb6c278a8e2b94.tar.bz2
volse-hubzilla-6e08f398200de8a1560e14cdb4fb6c278a8e2b94.zip
simplify
Diffstat (limited to 'mod/poke.php')
-rwxr-xr-xmod/poke.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/mod/poke.php b/mod/poke.php
index f4660e624..9cff0262e 100755
--- a/mod/poke.php
+++ b/mod/poke.php
@@ -28,6 +28,8 @@ function poke_init(&$a) {
return;
+ $private = ((x($_GET,'private')) ? intval($_GET['private']) : 0);
+
logger('poke: verb ' . $verb . ' contact ' . $contact_id, LOGGER_DEBUG);
@@ -62,13 +64,14 @@ function poke_init(&$a) {
$arr['author-link'] = $poster['url'];
$arr['author-avatar'] = $poster['thumb'];
$arr['title'] = '';
- $arr['allow_cid'] = $a->user['allow_cid'];
- $arr['allow_gid'] = $a->user['allow_gid'];
- $arr['deny_cid'] = $a->user['deny_cid'];
- $arr['deny_gid'] = $a->user['deny_gid'];
+ $arr['allow_cid'] = (($private) ? '<' . $target['id']. '>' : $a->user['allow_cid']);
+ $arr['allow_gid'] = (($private) ? '' : $a->user['allow_gid']);
+ $arr['deny_cid'] = (($private) ? '' : $a->user['deny_cid']);
+ $arr['deny_gid'] = (($private) ? '' : $a->user['deny_gid']);
$arr['last-child'] = 1;
$arr['visible'] = 1;
$arr['verb'] = $activity;
+ $arr['private'] = $private;
$arr['object-type'] = ACTIVITY_OBJ_PERSON;
$arr['origin'] = 1;
@@ -150,8 +153,8 @@ EOT;
$shortlist = array();
foreach($verbs as $k => $v)
- $shortlist[] = array($k,$v[1]);
-
+ if($v[1] !== 'NOTRANSLATION')
+ $shortlist[] = array($k,$v[1]);
$tpl = get_markup_template('poke_content.tpl');
@@ -161,6 +164,7 @@ EOT;
'$clabel' => t('Recipient'),
'$choice' => t('Choose what you wish to do to recipient'),
'$verbs' => $shortlist,
+ '$prv_desc' => t('Make this post private'),
'$submit' => t('Submit'),
'$name' => $name,
'$id' => $id