diff options
author | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-11-16 06:42:08 +0100 |
---|---|---|
committer | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-11-16 06:42:08 +0100 |
commit | 69487389d362285aeeb5106097864ec982c08a59 (patch) | |
tree | f5eede7c0a6a5ade0b097b6646f8de2cb33ba5e5 /mod | |
parent | fd5d1416d9a65206879588ff195a8e1d3b49c008 (diff) | |
parent | 0cb5f009b483ff570ded4570bb45023573531494 (diff) | |
download | volse-hubzilla-69487389d362285aeeb5106097864ec982c08a59.tar.gz volse-hubzilla-69487389d362285aeeb5106097864ec982c08a59.tar.bz2 volse-hubzilla-69487389d362285aeeb5106097864ec982c08a59.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod')
-rw-r--r-- | mod/editpost.php | 14 | ||||
-rw-r--r-- | mod/item.php | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/mod/editpost.php b/mod/editpost.php index 2f999858f..bd46ac14a 100644 --- a/mod/editpost.php +++ b/mod/editpost.php @@ -21,9 +21,9 @@ function editpost_content(&$a) { return; } - $itm = q("SELECT * FROM `item` WHERE `id` = %d AND `uid` = %d and author_xchan = '%s' LIMIT 1", + $itm = q("SELECT * FROM `item` WHERE `id` = %d AND ( owner_xchan = '%s' OR author_xchan = '%s' ) LIMIT 1", intval($post_id), - intval(local_channel()), + dbesc(get_observer_hash()), dbesc(get_observer_hash()) ); @@ -37,6 +37,8 @@ function editpost_content(&$a) { } + $owner_uid = $itm[0]['uid']; + $plaintext = true; // if(feature_enabled(local_channel(),'richtext')) @@ -71,14 +73,12 @@ function editpost_content(&$a) { call_hooks('jot_tool', $jotplugins); call_hooks('jot_networks', $jotnets); - $channel = $a->get_channel(); - //$tpl = replace_macros($tpl,array('$jotplugins' => $jotplugins)); - $voting = feature_enabled(local_channel(),'consensus_tools'); + $voting = feature_enabled($owner_uid,'consensus_tools'); $category = ''; - $catsenabled = ((feature_enabled(local_channel(),'categories')) ? 'categories' : ''); + $catsenabled = ((feature_enabled($owner_uid,'categories')) ? 'categories' : ''); if ($catsenabled){ $itm = fetch_post_tags($itm); @@ -145,7 +145,7 @@ function editpost_content(&$a) { '$lockstate' => $lockstate, '$acl' => '', '$bang' => '', - '$profile_uid' => local_channel(), + '$profile_uid' => $owner_uid, '$preview' => t('Preview'), '$jotplugins' => $jotplugins, '$sourceapp' => t($a->sourcename), diff --git a/mod/item.php b/mod/item.php index 5bf59de26..b66d71797 100644 --- a/mod/item.php +++ b/mod/item.php @@ -473,8 +473,8 @@ function item_post(&$a) { require_once('include/text.php'); if($uid && $uid == $profile_uid && feature_enabled($uid,'markdown')) { require_once('include/bb2diaspora.php'); + $body = escape_tags(trim($body)); $body = str_replace("\n",'<br />', $body); - $body = purify_html($body); $body = preg_replace_callback('/\[share(.*?)\]/ism','share_shield',$body); $body = diaspora2bb($body,true); |