diff options
author | friendica <info@friendica.com> | 2014-08-06 17:36:07 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-08-06 17:36:07 -0700 |
commit | afac37917761d726a4c046d2f42bb4e427574895 (patch) | |
tree | 0af1848677a756a59c47cfbf0660093c9ce041dd /include | |
parent | 778898afa5e36286f62e2871491f43c34cc0cdf3 (diff) | |
download | volse-hubzilla-afac37917761d726a4c046d2f42bb4e427574895.tar.gz volse-hubzilla-afac37917761d726a4c046d2f42bb4e427574895.tar.bz2 volse-hubzilla-afac37917761d726a4c046d2f42bb4e427574895.zip |
first step first - just store the public_policy data, don't do anything with it yet.
Diffstat (limited to 'include')
-rwxr-xr-x | include/items.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php index 679c24dc1..1c1c553f8 100755 --- a/include/items.php +++ b/include/items.php @@ -703,6 +703,11 @@ function get_item_elements($x) { $arr['mimetype'] = (($x['mimetype']) ? htmlspecialchars($x['mimetype'], ENT_COMPAT,'UTF-8',false) : ''); $arr['obj_type'] = (($x['object_type']) ? htmlspecialchars($x['object_type'], ENT_COMPAT,'UTF-8',false) : ''); $arr['tgt_type'] = (($x['target_type']) ? htmlspecialchars($x['target_type'], ENT_COMPAT,'UTF-8',false) : ''); + + $arr['public_policy'] = (($x['public_scope']) ? htmlspecialchars($x['public_scope'], ENT_COMPAT,'UTF-8',false) : ''); + if($arr['public_policy'] === 'public') + $arr['public_policy'] = ''; + $arr['comment_policy'] = (($x['comment_scope']) ? htmlspecialchars($x['comment_scope'], ENT_COMPAT,'UTF-8',false) : 'contacts'); $arr['sig'] = (($x['signature']) ? htmlspecialchars($x['signature'], ENT_COMPAT,'UTF-8',false) : ''); @@ -1732,6 +1737,8 @@ function item_store($arr,$allow_exec = false) { $arr['app'] = ((x($arr,'app')) ? notags(trim($arr['app'])) : ''); $arr['item_restrict'] = ((x($arr,'item_restrict')) ? intval($arr['item_restrict']) : 0 ); + $arr['public_policy'] = ((x($arr,'public_policy')) ? notags(trim($arr['public_policy'])) : '' ); + $arr['comment_policy'] = ((x($arr,'comment_policy')) ? notags(trim($arr['comment_policy'])) : 'contacts' ); @@ -2134,6 +2141,11 @@ function item_store_update($arr,$allow_exec = false) { $arr['sig'] = ((x($arr,'sig')) ? $arr['sig'] : ''); $arr['layout_mid'] = ((array_key_exists('layout_mid',$arr)) ? dbesc($arr['layout_mid']) : $orig[0]['layout_mid'] ); + $arr['public_policy'] = ((x($arr,'public_policy')) ? notags(trim($arr['public_policy'])) : $orig[0]['public_policy'] ); + $arr['comment_policy'] = ((x($arr,'comment_policy')) ? notags(trim($arr['comment_policy'])) : $orig[0]['comment_policy'] ); + + + call_hooks('post_remote_update',$arr); if(x($arr,'cancel')) { |