ソースを参照

! Some of the smaller 'actual' changes for this stuff.

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer 10 年 前
コミット
fecff7ab1d
4 ファイル変更3 行追加7 行削除
  1. 1 1
      Sources/Drafts.php
  2. 1 1
      Sources/Recent.php
  3. 1 1
      Sources/SplitTopics.php
  4. 0 4
      Sources/Topic.php

+ 1 - 1
Sources/Drafts.php

@@ -57,7 +57,7 @@ function SaveDraft(&$post_errors)
 	$draft['icon'] = empty($_POST['icon']) ? 'xx' : preg_replace('~[\./\\\\*:"\'<>]~', '', $_POST['icon']);
 	$draft['smileys_enabled'] = isset($_POST['ns']) ? (int) $_POST['ns'] : 0;
 	$draft['locked'] = isset($_POST['lock']) ? (int) $_POST['lock'] : 0;
-	$draft['sticky'] = isset($_POST['sticky']) && !empty($modSettings['enableStickyTopics']) ? (int) $_POST['sticky'] : 0;
+	$draft['sticky'] = isset($_POST['sticky']) ? (int) $_POST['sticky'] : 0;
 	$draft['subject'] = strtr($smcFunc['htmlspecialchars']($_POST['subject']), array("\r" => '', "\n" => '', "\t" => ''));
 	$draft['body'] = $smcFunc['htmlspecialchars']($_POST['message'], ENT_QUOTES);
 

+ 1 - 1
Sources/Recent.php

@@ -1273,7 +1273,7 @@ function UnreadTopics()
 			'new_href' => $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['new_from'] . ';topicseen#new',
 			'href' => $scripturl . '?topic=' . $row['id_topic'] . ($row['num_replies'] == 0 ? '.0' : '.msg' . $row['new_from']) . ';topicseen' . ($row['num_replies'] == 0 ? '' : 'new'),
 			'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . ($row['num_replies'] == 0 ? '.0' : '.msg' . $row['new_from']) . ';topicseen#msg' . $row['new_from'] . '" rel="nofollow">' . $row['first_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'],

+ 1 - 1
Sources/SplitTopics.php

@@ -932,7 +932,7 @@ function MergeIndex()
 		array(
 			'id_board' => $_REQUEST['targetboard'],
 			'id_topic' => $_GET['from'],
-			'sort' => (!empty($modSettings['enableStickyTopics']) ? 't.is_sticky DESC, ' : '') . 't.id_last_msg DESC',
+			'sort' => 't.is_sticky DESC, t.id_last_msg DESC',
 			'offset' => $_REQUEST['start'],
 			'limit' => $modSettings['defaultMaxTopics'],
 			'is_approved' => 1,

+ 0 - 4
Sources/Topic.php

@@ -111,10 +111,6 @@ function Sticky()
 	// Make sure the user can sticky it, and they are stickying *something*.
 	isAllowedTo('make_sticky');
 
-	// You shouldn't be able to (un)sticky a topic if the setting is disabled.
-	if (empty($modSettings['enableStickyTopics']))
-		fatal_lang_error('cannot_make_sticky', false);
-
 	// You can't sticky a board or something!
 	if (empty($topic))
 		fatal_lang_error('not_a_topic', false);