Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-9071

force_approved_state handled differently between posting.php & submit_post

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.0.x
    • Fix Version/s: 3.0.7
    • Component/s: Posting
    • Labels:
      None
    • Environment:
      PHP Environment:
      Database:

      Description

      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)

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: