aboutsummaryrefslogtreecommitdiffstats
path: root/mod/display.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-10-18 14:25:55 -0700
committerfriendica <info@friendica.com>2013-10-18 14:25:55 -0700
commit3772682204544e733baf910e6dfe35c0fe99e0e2 (patch)
tree5ca11953a9ee07ff04457dff7011a58ce239f31c /mod/display.php
parent4a87ebfc1267b04a84b278089f4482018d067786 (diff)
downloadvolse-hubzilla-3772682204544e733baf910e6dfe35c0fe99e0e2.tar.gz
volse-hubzilla-3772682204544e733baf910e6dfe35c0fe99e0e2.tar.bz2
volse-hubzilla-3772682204544e733baf910e6dfe35c0fe99e0e2.zip
Put a status editor on the display page if you're logged in. This fixes issue #113 and also provides the ability to reshare from that page.
Diffstat (limited to 'mod/display.php')
-rw-r--r--mod/display.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/mod/display.php b/mod/display.php
index 41df5fca6..99cbd6f0e 100644
--- a/mod/display.php
+++ b/mod/display.php
@@ -35,6 +35,29 @@ function display_content(&$a, $update = 0, $load = false) {
$observer_is_owner = false;
+
+ if(local_user() && (! $update)) {
+
+ $channel = $a->get_channel();
+
+ $x = array(
+ 'is_owner' => true,
+ 'allow_location' => ((intval(get_pconfig($channel['channel_id'],'system','use_browser_location'))) ? '1' : ''),
+ 'default_location' => $channel['channel_location'],
+ 'nickname' => $channel['channel_address'],
+ 'lockstate' => (($group || $cid || $channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'),
+
+ 'acl' => populate_acl($channel, false),
+ 'bang' => '',
+ 'visitor' => 'block',
+ 'profile_uid' => local_user(),
+ 'return_path' => '/channel/' . $channel['channel_address']
+ );
+
+ $o .= status_editor($a,$x);
+
+ }
+
// This page can be viewed by anybody so the query could be complicated
// First we'll see if there is a copy of the item which is owned by us - if we're logged in locally.
// If that fails (or we aren't logged in locally),