Bug tracker

This ticket has been moved to our new tracker. Open Ticket PHPBB3-9071 now.

force_approved_state handled differently between posting.php & submit_post (fix completed in vcs)

In submit_post:
Code: Select all
   if (isset($data['force_approved_state']))
   {
      $post_approval = ($data['force_approved_state']) ? 1 : 0;
   }


In posting.php:
Code: Select all
if ((!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id'])) || !empty($post_data['force_approved_state']))


!empty($post_data['force_approved_state']) should be like this:
Code: Select all
(isset($data['force_approved_state']) && !$data['force_approved_state'])


Otherwise !empty ignores when forcing the approved state to false and doesn't display the message requiring the post to be approved

EDIT: Also noticed that posting.php uses the wrong variable, $post_data instead of $data (fixed in the code above)

Comments / History

Edited ticket

Action performed by EXreaction (Former Team Member) on Feb 14th 2010, 20:38

Changed ticket severity from "Uncategorised/normal" to "Severe"

Action performed by EXreaction (Former Team Member) on Feb 18th 2010, 01:14

Changed ticket status from "New" to "Reviewed"

Action performed by A_Jelly_Doughnut (MOD Team Member) on Feb 18th 2010, 03:31

Assigned ticket to user "A_Jelly_Doughnut"

Action performed by A_Jelly_Doughnut (MOD Team Member) on Feb 18th 2010, 03:31

Posted by A_Jelly_Doughnut (MOD Team Member) on Feb 18th 2010, 03:32

The problem here is that what the code does not do what the comment says. phpBB does not use this code by itself.

Linked ticket with changeset: r10507

Action performed by A_Jelly_Doughnut (MOD Team Member) on Feb 18th 2010, 04:56

Linked ticket with changeset: r10508

Action performed by A_Jelly_Doughnut (MOD Team Member) on Feb 18th 2010, 04:57

Changed ticket status from "Reviewed" to "Fix completed in SVN"

Action performed by A_Jelly_Doughnut (MOD Team Member) on Feb 18th 2010, 04:59

Ticket details

Related SVN changesets