diff options
author | zotlabs <mike@macgirvin.com> | 2017-03-14 17:07:29 -0700 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-03-29 13:39:36 +0200 |
commit | fa629841bd2fd150531a5494504a24b13a0c4503 (patch) | |
tree | 934f08441cafe23667f66988266e492eba075c34 /Zotlabs/Module/Item.php | |
parent | 155b57c2de6e07147733f67605560c5ec00dc5e5 (diff) | |
download | volse-hubzilla-fa629841bd2fd150531a5494504a24b13a0c4503.tar.gz volse-hubzilla-fa629841bd2fd150531a5494504a24b13a0c4503.tar.bz2 volse-hubzilla-fa629841bd2fd150531a5494504a24b13a0c4503.zip |
input filter updates
Diffstat (limited to 'Zotlabs/Module/Item.php')
-rw-r--r-- | Zotlabs/Module/Item.php | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index 43cf535a4..71f410b2a 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -471,15 +471,16 @@ class Item extends \Zotlabs\Web\Controller { if(! $mimetype) $mimetype = 'text/bbcode'; + + $execflag = ((intval($uid) == intval($profile_uid) + && ($channel['channel_pageflags'] & PAGE_ALLOWCODE)) ? true : false); + if($preview) { - $body = z_input_filter($profile_uid,$body,$mimetype); + $body = z_input_filter($body,$mimetype,$execflag); } - // Verify ability to use html or php!!! - $execflag = ((intval($channel['channel_id']) == intval($profile_uid) && ($channel['channel_pageflags'] & PAGE_ALLOWCODE)) ? true : false); - $gacl = $acl->get(); $str_contact_allow = $gacl['allow_cid']; $str_group_allow = $gacl['allow_gid']; @@ -843,18 +844,6 @@ class Item extends \Zotlabs\Web\Controller { if(mb_strlen($datarray['title']) > 255) $datarray['title'] = mb_substr($datarray['title'],0,255); - if(array_key_exists('item_private',$datarray) && $datarray['item_private']) { - - $datarray['body'] = trim(z_input_filter($datarray['uid'],$datarray['body'],$datarray['mimetype'])); - - if($uid) { - if($channel['channel_hash'] === $datarray['author_xchan']) { - $datarray['sig'] = base64url_encode(rsa_sign($datarray['body'],$channel['channel_prvkey'])); - $datarray['item_verified'] = 1; - } - } - } - if($webpage) { Zlib\IConfig::Set($datarray,'system', webpage_to_namespace($webpage), (($pagetitle) ? $pagetitle : substr($datarray['mid'],0,16)),true); |