aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-11-11 18:57:59 -0800
committerfriendica <info@friendica.com>2014-11-11 18:57:59 -0800
commit37742be6af5aee1a5be8ba878379d9e21b39377d (patch)
tree18a73540d7cf8de420604c4e896ddf1a3fe7bfd9 /mod/item.php
parent570577a99089ff5bb48c5c67a612bdd874721e95 (diff)
downloadvolse-hubzilla-37742be6af5aee1a5be8ba878379d9e21b39377d.tar.gz
volse-hubzilla-37742be6af5aee1a5be8ba878379d9e21b39377d.tar.bz2
volse-hubzilla-37742be6af5aee1a5be8ba878379d9e21b39377d.zip
some more work on sys publishing
Diffstat (limited to 'mod/item.php')
-rw-r--r--mod/item.php21
1 files changed, 10 insertions, 11 deletions
diff --git a/mod/item.php b/mod/item.php
index 9688dbfe1..fdfc43bf2 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -33,14 +33,15 @@ function item_post(&$a) {
$uid = local_user();
$channel = null;
+ $observer = null;
- if(array_key_exists('sys',$_REQUEST) && $_REQUEST['sys'] == 1 && is_site_admin()) {
- require_once('include/identity.php');
- $sys = get_sys_channel();
- if($sys && intval($sys['channel_id'])) {
- $uid = intval($sys['channel_id']);
- $channel = $sys;
- }
+ $profile_uid = ((x($_REQUEST,'profile_uid')) ? intval($_REQUEST['profile_uid']) : 0);
+ require_once('include/identity.php');
+ $sys = get_sys_channel();
+ if($sys && $profile_uid && ($sys['channel_id'] == $profile_uid) && is_site_admin()) {
+ $uid = intval($sys['channel_id']);
+ $channel = $sys;
+ $observer = $sys;
}
if(x($_REQUEST,'dropitems')) {
@@ -78,7 +79,6 @@ function item_post(&$a) {
$message_id = ((x($_REQUEST,'message_id') && $api_source) ? strip_tags($_REQUEST['message_id']) : '');
$created = ((x($_REQUEST,'created')) ? datetime_convert('UTC','UTC',$_REQUEST['created']) : datetime_convert());
- $profile_uid = ((x($_REQUEST,'profile_uid')) ? intval($_REQUEST['profile_uid']) : 0);
$post_id = ((x($_REQUEST,'post_id')) ? intval($_REQUEST['post_id']) : 0);
$app = ((x($_REQUEST,'source')) ? strip_tags($_REQUEST['source']) : '');
$return_path = ((x($_REQUEST,'return')) ? $_REQUEST['return'] : '');
@@ -176,9 +176,8 @@ function item_post(&$a) {
}
-
- $observer = $a->get_observer();
-
+ if(! $observer)
+ $observer = $a->get_observer();
if($parent) {
logger('mod_item: item_post parent=' . $parent);