Permalink
Browse files

Commited fix to issue #1558 (http://ocportal.com/tracker/view.php?id=…

…1558). [Newbie members could abuse promotion via non-validated forum posts]
  • Loading branch information...
World Wide Web Server World Wide Web Server
World Wide Web Server authored and World Wide Web Server committed Feb 1, 2014
1 parent 5bce3bf commit d1ae01c5511c5281553abd713886e468b94f7045
Showing with 7 additions and 1 deletion.
  1. +1 −1 sources/ocf_posts_action.php
  2. +6 −0 sources/ocf_posts_action3.php
@@ -326,7 +326,7 @@ function ocf_make_post($topic_id,$title,$post,$skip_sig=0,$is_starter=false,$val
if (!is_null($forum_id))
{
$post_counts=is_null($forum_id)?1:$GLOBALS['FORUM_DB']->query_value_null_ok('f_forums','f_post_count_increment',array('id'=>$forum_id));
if (($post_counts===1) && (!$anonymous)) ocf_force_update_member_post_count($poster,1);
if (($post_counts===1) && (!$anonymous) && ($validated==1)) ocf_force_update_member_post_count($poster,1);
if ($check_permissions) ocf_decache_ocp_blocks($forum_id,NULL,$intended_solely_for); // i.e. we don't run this if in installer
}
@@ -60,6 +60,12 @@ function ocf_validate_post($post_id,$topic_id=NULL,$forum_id=NULL,$poster=NULL,$
$_url=build_url(array('page'=>'topicview','id'=>$topic_id),'forum',NULL,false,false,true,'post_'.strval($post_id));
$url=$_url->evaluate();
if (!is_null($forum_id))
{
$post_counts=$GLOBALS['FORUM_DB']->query_value_null_ok('f_forums','f_post_count_increment',array('id'=>$forum_id));
if ($post_counts===1) ocf_force_update_member_post_count($poster,1);
}
ocf_send_topic_notification($url,$topic_id,$forum_id,$poster,$is_starter,$post,$topic_info[0]['t_cache_first_title'],NULL,!is_null($topic_info[0]['t_pt_from']));
if (!is_null($forum_id))

0 comments on commit d1ae01c

Please sign in to comment.