aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profile.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-12-05 18:08:36 -0800
committerFriendika <info@friendika.com>2010-12-05 18:08:36 -0800
commit75306b62942a12995db67f48dd9b1a16f38c43eb (patch)
tree5c43d74fcb6a28e5757df13ed106be9b419d4b88 /mod/profile.php
parente9a1abd133aa3db62d17ef8bdc91e8a75f4004d3 (diff)
downloadvolse-hubzilla-75306b62942a12995db67f48dd9b1a16f38c43eb.tar.gz
volse-hubzilla-75306b62942a12995db67f48dd9b1a16f38c43eb.tar.bz2
volse-hubzilla-75306b62942a12995db67f48dd9b1a16f38c43eb.zip
allow community page members to upload photos and assorted other stuff which was previously restricted to the page owner
Diffstat (limited to 'mod/profile.php')
-rw-r--r--mod/profile.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/mod/profile.php b/mod/profile.php
index a19f370de..c18c7d196 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -82,7 +82,6 @@ function profile_init(&$a) {
function profile_content(&$a, $update = 0) {
-
require_once("include/bbcode.php");
require_once('include/security.php');
@@ -124,6 +123,7 @@ function profile_content(&$a, $update = 0) {
}
$is_owner = ((local_user()) && (local_user() == $a->profile['profile_uid']) ? true : false);
+
if(! $update) {
if(x($_GET,'tab'))
@@ -148,22 +148,27 @@ function profile_content(&$a, $update = 0) {
return $o;
}
+ $commpage = (($a->profile['page-flags'] == PAGE_COMMUNITY) ? true : false);
+ $commvisitor = (($commpage && $remote_contact == true) ? true : false);
+
$celeb = ((($a->profile['page-flags'] == PAGE_SOAPBOX) || ($a->profile['page-flags'] == PAGE_COMMUNITY)) ? true : false);
- if(can_write_wall($a,$a->profile['profile_uid'])) {
+ if(can_write_wall($a,$a->profile['profile_uid'])) {
- $geotag = (($is_owner && $a->profile['allow_location']) ? load_view_file('view/jot_geotag.tpl') : '');
+ $geotag = ((($is_owner || $commvisitor) && $a->profile['allow_location']) ? load_view_file('view/jot_geotag.tpl') : '');
$tpl = load_view_file('view/jot-header.tpl');
$a->page['htmlhead'] .= replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(),
- '$geotag' => $geotag
+ '$geotag' => $geotag,
+ '$nickname' => $a->profile['nickname']
));
require_once('include/acl_selectors.php');
- $tpl = load_view_file("view/jot.tpl");
+ $tpl = load_view_file('view/jot.tpl');
+
if(is_array($a->user) && ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid']))))
$lockstate = 'lock';
else
@@ -172,7 +177,7 @@ function profile_content(&$a, $update = 0) {
'$baseurl' => $a->get_baseurl(),
'$defloc' => (($is_owner) ? $a->user['default-location'] : ''),
'$return_path' => $a->cmd,
- '$visitor' => (($is_owner) ? 'block' : 'none'),
+ '$visitor' => (($is_owner || $commvisitor) ? 'block' : 'none'),
'$lockstate' => $lockstate,
'$bang' => '',
'$acl' => (($is_owner) ? populate_acl($a->user, $celeb) : ''),