aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-01-09 15:45:17 -0800
committerfriendica <info@friendica.com>2014-01-09 15:45:17 -0800
commitdb8ebc9f375478bddc0f48d972e3acfbde80685a (patch)
tree62063483f438fbab8e399e5a5a3550f953f09d13 /mod/item.php
parentba0fdde51cbaf12d0bf9f28c6f95421e5fadc695 (diff)
downloadvolse-hubzilla-db8ebc9f375478bddc0f48d972e3acfbde80685a.tar.gz
volse-hubzilla-db8ebc9f375478bddc0f48d972e3acfbde80685a.tar.bz2
volse-hubzilla-db8ebc9f375478bddc0f48d972e3acfbde80685a.zip
some minor cleanup on plinks for some very subtle permissions issues
Diffstat (limited to 'mod/item.php')
-rw-r--r--mod/item.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/mod/item.php b/mod/item.php
index 037c24835..915bed706 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -79,6 +79,7 @@ function item_post(&$a) {
$layout_mid = ((x($_REQUEST,'layout_mid')) ? escape_tags($_REQUEST['layout_mid']): '');
$plink = ((x($_REQUEST,'permalink')) ? escape_tags($_REQUEST['permalink']) : '');
+
/*
Check service class limits
*/
@@ -605,9 +606,12 @@ function item_post(&$a) {
$datarray = array();
if(! $parent) {
- $datarray['parent_mid'] = $mid;
$item_flags = $item_flags | ITEM_THREAD_TOP;
}
+
+ if ((! $plink) && ($item_flags & ITEM_THREAD_TOP)) {
+ $plink = z_root() . '/channel/' . $channel['channel_address'] . '/?f=&mid=' . $mid;
+ }
$datarray['aid'] = $channel['channel_account_id'];
$datarray['uid'] = $profile_uid;