Browse Source

Merge pull request #1029 from Oldiesmann/release-2.1

! Minor PM tweaks
Michael Eshom 11 years ago
parent
commit
cd785b471e

+ 4 - 2
Sources/PersonalMessage.php

@@ -105,10 +105,12 @@ function MessageMain()
 			SELECT COUNT(*) AS total, SUM(is_read) AS num_read
 			FROM {db_prefix}pm_recipients
 			WHERE id_member = {int:current_member}
-				AND in_inbox = {int:in_inbox}',
+				AND in_inbox = {int:in_inbox}
+				AND deleted = {int:not_deleted}',
 			array(
 				'current_member' => $user_info['id'],
 				'in_inbox' => 1,
+				'not_deleted' => 0,
 			)
 		);
 		
@@ -976,7 +978,7 @@ function MessageFolder()
 		if ($context['display_mode'] == 2)
 		{
 			$context['conversation_buttons'] = array(
-				'delete' => array('text' => 'delete_conversation', 'image' => 'delete.png', 'lang' => true, 'url' => $scripturl . '?action=pm;sa=pmactions;pm_actions[' . $context['current_pm'] . ']=delete;conversation;f=' . $context['folder'] . ';start=' . $context['start'] . ($context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '') . ';' . $context['session_var'] . '=' . $context['session_id'], 'custom' => 'onclick="return confirm(\'' . addslashes($txt['remove_message']) . '?\');"'),
+				'delete' => array('text' => 'delete_conversation', 'image' => 'delete.png', 'lang' => true, 'url' => $scripturl . '?action=pm;sa=pmactions;pm_actions[' . $context['current_pm'] . ']=delete;conversation;f=' . $context['folder'] . ';start=' . $context['start'] . ($context['current_label_id'] != -1 ? ';l=' . $context['current_label_id'] : '') . ';' . $context['session_var'] . '=' . $context['session_id'], 'custom' => 'onclick="return confirm(\'' . addslashes($txt['remove_conversation']) . '?\');"'),
 			);
 
 			// Allow mods to add additional buttons here

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

@@ -35,6 +35,7 @@ $txt['delete_selected_confirm'] = 'Are you sure you want to delete all selected
 $txt['sent_to'] = 'Sent to';
 $txt['reply_to_all'] = 'Reply to All';
 $txt['delete_conversation'] = 'Delete Conversation';
+$txt['remove_conversation'] = 'Remove all messages in this conversation?';
 
 $txt['pm_capacity'] = 'Capacity';
 $txt['pm_currently_using'] = '%1$s messages, %2$s%% full.';