Przeglądaj źródła

Merge pull request #1113 from Arantor/release-2.1

Minor things just while I'm in the mood
Arantor 11 lat temu
rodzic
commit
eddcdefe80
2 zmienionych plików z 5 dodań i 4 usunięć
  1. 1 1
      Sources/Memberlist.php
  2. 4 3
      Sources/Search.php

+ 1 - 1
Sources/Memberlist.php

@@ -70,7 +70,7 @@ function Memberlist()
 			),
 		),
 		'real_name' => array(
-			'label' => $txt['username'],
+			'label' => $txt['name'],
 			'sort' => array(
 				'down' => 'mem.real_name DESC',
 				'up' => 'mem.real_name ASC'

+ 4 - 3
Sources/Search.php

@@ -1840,9 +1840,8 @@ function PlushSearch2()
 	$context['sub_template'] = 'results';
 	$context['page_title'] = $txt['search_results'];
 	$context['get_topics'] = 'prepareSearchContext';
-	$context['can_send_pm'] = allowedTo('pm_send');
-	$context['can_send_email'] = allowedTo('send_email_to_members');
-	$context['can_restore'] = allowedTo('move_any') && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] == $board;
+	$context['can_restore_perm'] = allowedTo('move_any') && !empty($modSettings['recycle_enable']);
+	$context['can_restore'] = false; // We won't know until we handle the context later whether we can actually restore...
 
 	$context['jump_to'] = array(
 		'label' => addslashes(un_htmlspecialchars($txt['jump_to'])),
@@ -2068,6 +2067,7 @@ function prepareSearchContext($reset = false)
 			'sticky' => (in_array(0, $boards_can['make_sticky']) || in_array($output['board']['id'], $boards_can['make_sticky'])),
 			'move' => in_array(0, $boards_can['move_any']) || in_array($output['board']['id'], $boards_can['move_any']) || ($started && (in_array(0, $boards_can['move_own']) || in_array($output['board']['id'], $boards_can['move_own']))),
 			'remove' => in_array(0, $boards_can['remove_any']) || in_array($output['board']['id'], $boards_can['remove_any']) || ($started && (in_array(0, $boards_can['remove_own']) || in_array($output['board']['id'], $boards_can['remove_own']))),
+			'restore' => $context['can_restore_perm'] && ($modSettings['recycle_board'] == $output['board']['id']),
 		);
 
 		$context['can_lock'] |= $output['quick_mod']['lock'];
@@ -2075,6 +2075,7 @@ function prepareSearchContext($reset = false)
 		$context['can_move'] |= $output['quick_mod']['move'];
 		$context['can_remove'] |= $output['quick_mod']['remove'];
 		$context['can_merge'] |= in_array($output['board']['id'], $boards_can['merge_any']);
+		$context['can_restore'] |= $output['quick_mod']['restore'];
 		$context['can_markread'] = $context['user']['is_logged'];
 
 		$context['qmod_actions'] = array('remove', 'lock', 'sticky', 'move', 'merge', 'restore', 'markread');