|
@@ -353,7 +353,7 @@ function MessageIndex()
|
|
|
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)' : '') . '
|
|
|
WHERE t.id_board = {int:current_board}' . (!$modSettings['postmod_active'] || $context['can_approve_posts'] ? '' : '
|
|
|
AND (t.approved = {int:is_approved}' . ($user_info['is_guest'] ? '' : ' OR t.id_member_started = {int:current_member}') . ')') . '
|
|
|
- ORDER BY ' . (!empty($modSettings['enableStickyTopics']) ? 'is_sticky' . ($fake_ascending ? '' : ' DESC') . ', ' : '') . $_REQUEST['sort'] . ($ascending ? '' : ' DESC') . '
|
|
|
+ ORDER BY is_sticky' . ($fake_ascending ? '' : ' DESC') . ', ' . $_REQUEST['sort'] . ($ascending ? '' : ' DESC') . '
|
|
|
LIMIT {int:start}, {int:maxindex}',
|
|
|
array(
|
|
|
'current_board' => $board,
|
|
@@ -399,7 +399,7 @@ function MessageIndex()
|
|
|
LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = ml.id_member)' : '') . '
|
|
|
WHERE ' . ($pre_query ? 't.id_topic IN ({array_int:topic_list})' : 't.id_board = {int:current_board}') . (!$modSettings['postmod_active'] || $context['can_approve_posts'] ? '' : '
|
|
|
AND (t.approved = {int:is_approved}' . ($user_info['is_guest'] ? '' : ' OR t.id_member_started = {int:current_member}') . ')') . '
|
|
|
- ORDER BY ' . ($pre_query ? 'FIND_IN_SET(t.id_topic, {string:find_set_topics})' : (!empty($modSettings['enableStickyTopics']) ? 'is_sticky' . ($fake_ascending ? '' : ' DESC') . ', ' : '') . $_REQUEST['sort'] . ($ascending ? '' : ' DESC')) . '
|
|
|
+ ORDER BY ' . ($pre_query ? 'FIND_IN_SET(t.id_topic, {string:find_set_topics})' : 'is_sticky' . ($fake_ascending ? '' : ' DESC') . ', ' . $_REQUEST['sort'] . ($ascending ? '' : ' DESC')) . '
|
|
|
LIMIT ' . ($pre_query ? '' : '{int:start}, ') . '{int:maxindex}',
|
|
|
array(
|
|
|
'current_board' => $board,
|
|
@@ -551,7 +551,7 @@ function MessageIndex()
|
|
|
'href' => $scripturl . '?topic=' . $row['id_topic'] . ($user_info['is_guest'] ? ('.' . (!empty($options['view_newest_first']) ? 0 : ((int) (($row['num_replies']) / $context['pageindex_multiplier'])) * $context['pageindex_multiplier']) . '#msg' . $row['id_last_msg']) : (($row['num_replies'] == 0 ? '.0' : '.msg' . $row['id_last_msg']) . '#new')),
|
|
|
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . ($user_info['is_guest'] ? ('.' . (!empty($options['view_newest_first']) ? 0 : ((int) (($row['num_replies']) / $context['pageindex_multiplier'])) * $context['pageindex_multiplier']) . '#msg' . $row['id_last_msg']) : (($row['num_replies'] == 0 ? '.0' : '.msg' . $row['id_last_msg']) . '#new')) . '" ' . ($row['num_replies'] == 0 ? '' : 'rel="nofollow"') . '>' . $row['last_subject'] . '</a>'
|
|
|
),
|
|
|
- 'is_sticky' => !empty($modSettings['enableStickyTopics']) && !empty($row['is_sticky']),
|
|
|
+ 'is_sticky' => !empty($row['is_sticky']),
|
|
|
'is_locked' => !empty($row['locked']),
|
|
|
'is_poll' => $modSettings['pollMode'] == '1' && $row['id_poll'] > 0,
|
|
|
'is_hot' => $row['num_replies'] >= $modSettings['hotTopicPosts'],
|
|
@@ -620,7 +620,7 @@ function MessageIndex()
|
|
|
{
|
|
|
$context['can_markread'] = $context['user']['is_logged'];
|
|
|
$context['can_lock'] = allowedTo('lock_any');
|
|
|
- $context['can_sticky'] = allowedTo('make_sticky') && !empty($modSettings['enableStickyTopics']);
|
|
|
+ $context['can_sticky'] = allowedTo('make_sticky');
|
|
|
$context['can_move'] = allowedTo('move_any');
|
|
|
$context['can_remove'] = allowedTo('remove_any');
|
|
|
$context['can_merge'] = allowedTo('merge_any');
|
|
@@ -635,7 +635,7 @@ function MessageIndex()
|
|
|
$started = $topic['first_post']['member']['id'] == $user_info['id'];
|
|
|
$context['topics'][$t]['quick_mod'] = array(
|
|
|
'lock' => allowedTo('lock_any') || ($started && allowedTo('lock_own')),
|
|
|
- 'sticky' => allowedTo('make_sticky') && !empty($modSettings['enableStickyTopics']),
|
|
|
+ 'sticky' => allowedTo('make_sticky'),
|
|
|
'move' => allowedTo('move_any') || ($started && allowedTo('move_own')),
|
|
|
'modify' => allowedTo('modify_any') || ($started && allowedTo('modify_own')),
|
|
|
'remove' => allowedTo('remove_any') || ($started && allowedTo('remove_own')),
|
|
@@ -733,7 +733,7 @@ function QuickModeration()
|
|
|
|
|
|
if (!$user_info['is_guest'])
|
|
|
$possibleActions[] = 'markread';
|
|
|
- if (!empty($boards_can['make_sticky']) && !empty($modSettings['enableStickyTopics']))
|
|
|
+ if (!empty($boards_can['make_sticky']))
|
|
|
$possibleActions[] = 'sticky';
|
|
|
if (!empty($boards_can['move_any']) || !empty($boards_can['move_own']))
|
|
|
$possibleActions[] = 'move';
|