diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2009-08-05 13:01:03 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2009-08-05 13:01:03 +0000 |
commit | f3a2c096e7f502e877ada6924d1fedffde59d431 (patch) | |
tree | 4721bc93e77da73cf0469b9be4b3fbacc15b6d03 /phpBB | |
parent | 914687075da7769583e2752701121deee61ff525 (diff) | |
download | forums-f3a2c096e7f502e877ada6924d1fedffde59d431.tar forums-f3a2c096e7f502e877ada6924d1fedffde59d431.tar.gz forums-f3a2c096e7f502e877ada6924d1fedffde59d431.tar.bz2 forums-f3a2c096e7f502e877ada6924d1fedffde59d431.tar.xz forums-f3a2c096e7f502e877ada6924d1fedffde59d431.zip |
submit_post() now accepts force_approved_state key passed to $data to indicate new posts being approved (true) or unapproved (false).
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9927 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/docs/CHANGELOG.html | 1 | ||||
-rw-r--r-- | phpBB/includes/functions_posting.php | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 00fae0c47d..c373a5a8f7 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -188,6 +188,7 @@ <li>[Fix] Adjust build_url() to not prepend $phpbb_root_path if path returned from redirect() is an URL. This fixes redirect issues with some installations and bridges. (Bug #47535)</li> <li>[Fix] Do not mark global announcements as read if all topics in a forum become read (Bug #15729).</li> <li>[Fix] Fix general error while registration, through undefined variable $config in validate_referer (Bug #49035 - Patch by wjvriend)</li> + <li>[Change] submit_post() now accepts force_approved_state key passed to $data to indicate new posts being approved (true) or unapproved (false).</li> <li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li> <li>[Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)</li> <li>[Change] Template engine now permits to a limited extent variable includes.</li> diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 61741ceb81..0991035c32 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1674,14 +1674,22 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u } // This variable indicates if the user is able to post or put into the queue - it is used later for all code decisions regarding approval + // The variable name should be $post_approved, because it indicates if the post is approved or not $post_approval = 1; // Check the permissions for post approval. Moderators are not affected. if (!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id'])) { + // Post not approved, but in queue $post_approval = 0; } + // Mods are able to force approved/unapproved posts. True means the post is approved, false the post is unapproved + if ($data['force_approved_state']) + { + $post_approval = ($data['force_approved_state']) ? 1 : 0; + } + // Start the transaction here $db->sql_transaction('begin'); |