Переглянути джерело

! Always warn users on new posts.

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer 10 роки тому
батько
коміт
adec6c5fd5

+ 2 - 2
Sources/Post.php

@@ -316,7 +316,7 @@ function Post($post_errors = array())
 	// only at preview
 	if (empty($_REQUEST['msg']) && !empty($topic))
 	{
-		if (empty($options['no_new_reply_warning']) && isset($_REQUEST['last_msg']) && $context['topic_last_message'] > $_REQUEST['last_msg'])
+		if (isset($_REQUEST['last_msg']) && $context['topic_last_message'] > $_REQUEST['last_msg'])
 		{
 			$request = $smcFunc['db_query']('', '
 				SELECT COUNT(*)
@@ -1341,7 +1341,7 @@ function Post2()
 		}
 
 		// If the number of replies has changed, if the setting is enabled, go back to Post() - which handles the error.
-		if (empty($options['no_new_reply_warning']) && isset($_POST['last_msg']) && $topic_info['id_last_msg'] > $_POST['last_msg'])
+		if (isset($_POST['last_msg']) && $topic_info['id_last_msg'] > $_POST['last_msg'])
 		{
 			$_REQUEST['preview'] = true;
 			return Post();

+ 0 - 7
Themes/default/Profile.template.php

@@ -1620,13 +1620,6 @@ function template_profile_theme_settings()
 							<dd>
 								<input type="hidden" name="default_options[return_to_post]" value="0" />
 								<input type="checkbox" name="default_options[return_to_post]" id="return_to_post" value="1"', !empty($context['member']['options']['return_to_post']) ? ' checked="checked"' : '', ' class="input_check" />
-							</dd>
-							<dt>
-								<label for="no_new_reply_warning">', $txt['no_new_reply_warning'], '</label>
-							</dt>
-							<dd>
-								<input type="hidden" name="default_options[no_new_reply_warning]" value="0" />
-								<input type="checkbox" name="default_options[no_new_reply_warning]" id="no_new_reply_warning" value="1"', !empty($context['member']['options']['no_new_reply_warning']) ? ' checked="checked"' : '', ' class="input_check" />
 							</dd>';
 
 	if (!empty($modSettings['enable_buddylist']))

+ 0 - 5
Themes/default/Settings.template.php

@@ -35,11 +35,6 @@ function template_options()
 			'label' => $txt['return_to_post'],
 			'default' => true,
 		),
-		array(
-			'id' => 'no_new_reply_warning',
-			'label' => $txt['no_new_reply_warning'],
-			'default' => true,
-		),
 		array(
 			'id' => 'view_newest_first',
 			'label' => $txt['recent_posts_at_top'],

+ 0 - 1
Themes/default/languages/Profile.english.php

@@ -303,7 +303,6 @@ $txt['ban_type_access'] = 'access forum';
 $txt['show_online'] = 'Show others my online status';
 
 $txt['return_to_post'] = 'Return to topics after posting by default.';
-$txt['no_new_reply_warning'] = 'Don\'t warn on new replies made while posting.';
 $txt['posts_apply_ignore_list'] = 'Hide messages posted by members on my ignore list.';
 $txt['recent_posts_at_top'] = 'Show most recent posts at the top.';
 $txt['recent_pms_at_top'] = 'Show most recent personal messages at top.';

+ 1 - 1
other/upgrade_2-1_mysql.sql

@@ -558,7 +558,7 @@ WHERE variable IN ('enableStickyTopics', 'guest_hideContacts', 'notify_new_regis
 
 ---# Cleaning up old theme settings.
 DELETE FROM {$db_prefix}themes
-WHERE variable IN ('show_board_desc');
+WHERE variable IN ('show_board_desc', 'no_new_reply_warning');
 ---#
 
 /******************************************************************************/

+ 1 - 1
other/upgrade_2-1_postgresql.sql

@@ -638,7 +638,7 @@ WHERE variable IN ('enableStickyTopics', 'guest_hideContacts', 'notify_new_regis
 
 ---# Cleaning up old theme settings.
 DELETE FROM {$db_prefix}themes
-WHERE variable IN ('show_board_desc');
+WHERE variable IN ('show_board_desc', 'no_new_reply_warning');
 ---#
 
 /******************************************************************************/

+ 1 - 1
other/upgrade_2-1_sqlite.sql

@@ -629,7 +629,7 @@ WHERE variable IN ('enableStickyTopics', 'guest_hideContacts', 'notify_new_regis
 
 ---# Cleaning up old theme settings.
 DELETE FROM {$db_prefix}themes
-WHERE variable IN ('show_board_desc');
+WHERE variable IN ('show_board_desc', 'no_new_reply_warning');
 ---#
 
 /******************************************************************************/