Browse Source

Merge pull request #258 from Labradoodle-360/undefined-current_pm

Conflicts:
	Sources/PersonalMessage.php
emanuele 12 years ago
parent
commit
4793373f14
1 changed files with 11 additions and 11 deletions
  1. 11 11
      Sources/PersonalMessage.php

+ 11 - 11
Sources/PersonalMessage.php

@@ -837,6 +837,17 @@ function MessageFolder()
 				'id_member' => $context['folder'] == 'sent' ? 'pmr.id_member' : 'pm.id_member_from',
 			)
 		);
+
+		// Build the conversation button array.
+		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']) . '?\');"'),
+			);
+
+			// Allow mods to add additional buttons here
+			call_integration_hook('integrate_conversation_buttons');
+		}
 	}
 	else
 		$messages_request = false;
@@ -857,17 +868,6 @@ function MessageFolder()
 		elseif (!empty($context['current_pm']))
 			markMessages($display_pms, $context['current_label_id']);
 	}
-
-	// Build the conversation button array.
-	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']) . '?\');"'),
-		);
-
-		// Allow mods to add additional buttons here
-		call_integration_hook('integrate_conversation_buttons');
-	}
 }
 
 /**