aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2009-07-08 10:22:36 +0000
committerAndreas Fischer <bantu@phpbb.com>2009-07-08 10:22:36 +0000
commitf368e0ec09b38c885465478ff965400ffdc5c65e (patch)
tree51fc4acc7a12cf166eabb363bc8077f1bd04a12b /phpBB/includes/functions_posting.php
parent8750fdf3f57bad9bbf64eb98a8fb85a3dc3f1b0a (diff)
downloadforums-f368e0ec09b38c885465478ff965400ffdc5c65e.tar
forums-f368e0ec09b38c885465478ff965400ffdc5c65e.tar.gz
forums-f368e0ec09b38c885465478ff965400ffdc5c65e.tar.bz2
forums-f368e0ec09b38c885465478ff965400ffdc5c65e.tar.xz
forums-f368e0ec09b38c885465478ff965400ffdc5c65e.zip
Another feature: Detect when a post has been altered by someone else while editing.
Authorised by: acydburn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9731 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 18bb432769..22fbfe3495 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -944,6 +944,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
WHERE p.topic_id = $topic_id
" . ((!$auth->acl_get('m_approve', $forum_id)) ? 'AND p.post_approved = 1' : '') . '
' . (($mode == 'post_review') ? " AND p.post_id > $cur_post_id" : '') . '
+ ' . (($mode == 'post_review_edit') ? " AND p.post_id = $cur_post_id" : '') . '
ORDER BY p.post_time ';
$sql .= ($mode == 'post_review') ? 'ASC' : 'DESC';
$result = $db->sql_query_limit($sql, $config['posts_per_page']);
@@ -962,6 +963,12 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
return false;
}
+ // Handle 'post_review_edit' like 'post_review' from now on
+ if ($mode == 'post_review_edit')
+ {
+ $mode = 'post_review';
+ }
+
$sql = $db->sql_build_query('SELECT', array(
'SELECT' => 'u.username, u.user_id, u.user_colour, p.*, z.friend, z.foe',