Bläddra i källkod

If guest access is not allowed let's hide the search too

Signed-off-by: emanuele <[email protected]>
emanuele 12 år sedan
förälder
incheckning
0ed2c74849
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      Sources/Subs.php

+ 1 - 1
Sources/Subs.php

@@ -3700,7 +3700,7 @@ function setupMenuContext()
 	global $context, $modSettings, $user_info, $txt, $scripturl;
 
 	// Set up the menu privileges.
-	$context['allow_search'] = allowedTo('search_posts');
+	$context['allow_search'] = !empty($modSettings['allow_guestAccess']) ? allowedTo('search_posts') : (!$user_info['is_guest'] && allowedTo('search_posts'));
 	$context['allow_admin'] = allowedTo(array('admin_forum', 'manage_boards', 'manage_permissions', 'moderate_forum', 'manage_membergroups', 'manage_bans', 'send_mail', 'edit_news', 'manage_attachments', 'manage_smileys'));
 	$context['allow_edit_profile'] = !$user_info['is_guest'] && allowedTo(array('profile_view_own', 'profile_view_any', 'profile_identity_own', 'profile_identity_any', 'profile_extra_own', 'profile_extra_any', 'profile_remove_own', 'profile_remove_any', 'moderate_forum', 'manage_membergroups', 'profile_title_own', 'profile_title_any'));
 	$context['allow_memberlist'] = allowedTo('view_mlist');