diff options
author | friendica <info@friendica.com> | 2012-01-24 18:59:55 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-01-24 18:59:55 -0800 |
commit | e2d0eb4a88d3ebd92e87a3e1969f78972396dd6f (patch) | |
tree | 23bd81f2d92b663b9920bc8968ced3c788b21d0a /mod/item.php | |
parent | dae0c1ded2bdba958ada3ba6f44b018cc959fbeb (diff) | |
download | volse-hubzilla-e2d0eb4a88d3ebd92e87a3e1969f78972396dd6f.tar.gz volse-hubzilla-e2d0eb4a88d3ebd92e87a3e1969f78972396dd6f.tar.bz2 volse-hubzilla-e2d0eb4a88d3ebd92e87a3e1969f78972396dd6f.zip |
redirect to a useful location after deleting or ignoring a friend request, begin comment moderation logic
Diffstat (limited to 'mod/item.php')
-rwxr-xr-x | mod/item.php | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/mod/item.php b/mod/item.php index f7eb0961c..ed3d7749c 100755 --- a/mod/item.php +++ b/mod/item.php @@ -20,7 +20,7 @@ require_once('include/enotify.php'); function item_post(&$a) { - if((! local_user()) && (! remote_user())) + if((! local_user()) && (! remote_user()) && (! x($_REQUEST,'commenter'))) return; require_once('include/security.php'); @@ -110,11 +110,35 @@ function item_post(&$a) { if($parent) logger('mod_post: parent=' . $parent); + + $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']) : ''); - if(! can_write_wall($a,$profile_uid)) { + $allow_moderated = false; + + // here is where we are going to check for permission to post a moderated comment. + + // First check that the parent exists and it is a wall item. + + if((x($_REQUEST,'commenter')) && ((! $parent) || (! $parent_item['wall']))) { + notice( t('Permission denied.') . EOL) ; + if(x($_REQUEST,'return')) + goaway($a->get_baseurl() . "/" . $return_path ); + killme(); + } + + // Now check that it is a page_type of PAGE_BLOG, and that valid personal details + // have been provided, and run any anti-spam plugins + + + // TODO + + + + + if((! can_write_wall($a,$profile_uid)) && (! $allow_moderated)) { notice( t('Permission denied.') . EOL) ; if(x($_REQUEST,'return')) goaway($a->get_baseurl() . "/" . $return_path ); |