Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-9071

force_approved_state handled differently between posting.php & submit_post

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 3.0.7
    • 3.0.x
    • Posting
    • None
    • PHP Environment:
      Database:

      In submit_post:

      	if (isset($data['force_approved_state']))
      	{
      		$post_approval = ($data['force_approved_state']) ? 1 : 0;
      	}

      In posting.php:

      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:

      (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)

            A_Jelly_Doughnut A_Jelly_Doughnut
            EXreaction EXreaction [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: