1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[feature/soft-delete] Fix some small bugs

To wit: using non-existing constant POST_DELETED in posting.php; first test
post was initially unapproved; soft delete checkbox appeared at post time
Links pointing to the wrong place.

PHPBB3-9657
This commit is contained in:
Josh Woody
2010-07-17 14:34:36 -05:00
committed by Joas Schilling
parent f570558a8d
commit 1ab41f8dc6
8 changed files with 98 additions and 25 deletions

View File

@@ -322,6 +322,7 @@ class mcp_queue
if ($mode == 'unapproved_posts' || $mode == 'deleted_posts')
{
$visibility_const = ($mode == 'unapproved_posts') ? ITEM_UNAPPROVED : ITEM_DELETED;
$starter_sql = ($mode == 'unapproved_posts') ? 'AND t.topic_first_post_id <> p.post_id' : '';
$sql = 'SELECT p.post_id
FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t' . (($sort_order_sql[0] == 'u') ? ', ' . USERS_TABLE . ' u' : '') . '
@@ -330,7 +331,7 @@ class mcp_queue
' . (($sort_order_sql[0] == 'u') ? 'AND u.user_id = p.poster_id' : '') . '
' . (($topic_id) ? 'AND p.topic_id = ' . $topic_id : '') . "
AND t.topic_id = p.topic_id
AND t.topic_first_post_id <> p.post_id
$starter_sql
$limit_time_sql
ORDER BY $sort_order_sql";
$result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);