|
@@ -324,7 +324,7 @@ discard block |
|
|
block discarded – undo |
|
324
|
324
|
' . (empty($sort_methods_table[$context['sort_by']]) ? '' : $sort_methods_table[$context['sort_by']]) . ' |
|
325
|
325
|
WHERE t.id_board = {int:current_board} ' |
|
326
|
326
|
. (!$modSettings['postmod_active'] || $context['can_approve_posts'] ? '' : ' |
|
327
|
|
- AND (t.approved = {int:is_approved}' . ($user_info['is_guest'] ? '' : ' OR t.id_member_started = {int:current_member}') . ')') .' |
|
|
327
|
+ AND (t.approved = {int:is_approved}' . ($user_info['is_guest'] ? '' : ' OR t.id_member_started = {int:current_member}') . ')') . ' |
|
328
|
328
|
ORDER BY is_sticky' . ($fake_ascending ? '' : ' DESC') . ', ' . $_REQUEST['sort'] . ($ascending ? '' : ' DESC') . ' |
|
329
|
329
|
LIMIT {int:maxindex} |
|
330
|
330
|
OFFSET {int:start} '; |
|
@@ -333,7 +333,7 @@ discard block |
|
|
block discarded – undo |
|
333
|
333
|
SELECT |
|
334
|
334
|
t.id_topic, t.num_replies, t.locked, t.num_views, t.is_sticky, t.id_poll, t.id_previous_board, |
|
335
|
335
|
' . ($user_info['is_guest'] ? '0' : 'COALESCE(lt.id_msg, COALESCE(lmr.id_msg, -1)) + 1') . ' AS new_from, |
|
336
|
|
- ' . ( $enableParticipation ? ' COALESCE(( SELECT 1 FROM {db_prefix}messages AS parti WHERE t.id_topic = parti.id_topic and parti.id_member = {int:current_member} LIMIT 1) , 0) as is_posted_in, |
|
|
336
|
+ ' . ($enableParticipation ? ' COALESCE(( SELECT 1 FROM {db_prefix}messages AS parti WHERE t.id_topic = parti.id_topic and parti.id_member = {int:current_member} LIMIT 1) , 0) as is_posted_in, |
|
337
|
337
|
' : '') . ' |
|
338
|
338
|
t.id_last_msg, t.approved, t.unapproved_posts, ml.poster_time AS last_poster_time, t.id_redirect_topic, |
|
339
|
339
|
ml.id_msg_modified, ml.subject AS last_subject, ml.icon AS last_icon, |
|
@@ -357,7 +357,7 @@ discard block |
|
|
block discarded – undo |
|
357
|
357
|
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = {int:current_board} AND lmr.id_member = {int:current_member})') . ' |
|
358
|
358
|
' . (!empty($message_index_tables) ? implode("\n\t\t\t\t", $message_index_tables) : '') . ' |
|
359
|
359
|
' . (!empty($message_index_wheres) ? ' WHERE ' . implode("\n\t\t\t\tAND ", $message_index_wheres) : '') . ' |
|
360
|
|
- ORDER BY is_sticky' . ($fake_ascending ? '' : ' DESC') . ', ' . $_REQUEST['sort'] . ($ascending ? '' : ' DESC') , |
|
|
360
|
+ ORDER BY is_sticky' . ($fake_ascending ? '' : ' DESC') . ', ' . $_REQUEST['sort'] . ($ascending ? '' : ' DESC'), |
|
361
|
361
|
$message_index_parameters |
|
362
|
362
|
); |
|
363
|
363
|
|