aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/channel.php2
-rw-r--r--mod/item.php15
-rw-r--r--mod/page.php22
3 files changed, 34 insertions, 5 deletions
diff --git a/mod/channel.php b/mod/channel.php
index 395160d2c..e4a7173c0 100644
--- a/mod/channel.php
+++ b/mod/channel.php
@@ -64,7 +64,7 @@ function channel_content(&$a, $update = 0, $load = false) {
if($update) {
// Ensure we've got a profile owner if updating.
- $a->profile['profile_uid'] = $update;
+ $a->profile['profile_uid'] = $a->profile_uid = $update;
}
else {
if($a->profile['profile_uid'] == local_user()) {
diff --git a/mod/item.php b/mod/item.php
index ac15e50e8..589e3beb1 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -257,10 +257,16 @@ function item_post(&$a) {
killme();
}
+ $walltowall = false;
+
if($observer) {
logger('mod_item: post accepted from ' . $observer['xchan_name'] . ' for ' . $owner_xchan['xchan_name'], LOGGER_DEBUG);
+ if($observer['xchan_name'] != $owner_xchan['xchan_name'])
+ $walltowall = true;
}
+
+
$public_policy = ((x($_REQUEST,'public_policy')) ? escape_tags($_REQUEST['public_policy']) : map_scope($channel['channel_r_stream'],true));
if($webpage)
$public_policy = '';
@@ -329,6 +335,15 @@ function item_post(&$a) {
$str_group_deny = $channel['channel_deny_gid'];
$str_contact_deny = $channel['channel_deny_cid'];
}
+ elseif($walltowall) {
+
+ // use the channel owner's default permissions
+
+ $str_group_allow = $channel['channel_allow_gid'];
+ $str_contact_allow = $channel['channel_allow_cid'];
+ $str_group_deny = $channel['channel_deny_gid'];
+ $str_contact_deny = $channel['channel_deny_cid'];
+ }
else {
// use the posted permissions
diff --git a/mod/page.php b/mod/page.php
index b3f53a227..e8f17ebda 100644
--- a/mod/page.php
+++ b/mod/page.php
@@ -14,13 +14,11 @@ function page_init(&$a) {
if($a->profile['profile_uid'])
head_set_icon($a->profile['thumb']);
-}
-
+ // load the item here in the init function because we need to extract
+ // the page layout and initialise the correct theme.
-function page_content(&$a) {
-
$observer = $a->get_observer();
$ob_hash = (($observer) ? $observer['xchan_hash'] : '');
@@ -97,11 +95,27 @@ function page_content(&$a) {
}
}
+ $a->data['webpage'] = $r;
+
+
+
+}
+
+
+
+
+function page_content(&$a) {
+
+ $r = $a->data['webpage'];
+ if(! $r)
+ return;
// logger('layout: ' . print_r($a->layout,true));
// Use of widgets should be determined by Comanche, but we don't have it on system pages yet, so...
+ // I recommend we now get rid of this bit - it's quite a hack to work around... - mike
+
if ($perms['write_pages']) {
$chan = $a->channel['channel_id'];
$who = $channel_address;