From a1367b219933139d6279a439aac0f6a7e1aecaf6 Mon Sep 17 00:00:00 2001 From: Jackmcbarn Date: Wed, 18 Jun 2014 13:37:14 -0400 Subject: [PATCH] Use quickUserCan instead of userCan for searches When displaying search results, use quickUserCan instead of userCan when checking whether the user can create the page they searched for. This will result in things like the titleblacklist still letting users proceed to the edit window, so that they can see the custom error message, rather than having no idea why they can't create the page. Change-Id: Idb428703bb69a83e04bb05df1e7106b6db7bda45 --- includes/specials/SpecialSearch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 1cc5930ac7..f44703c314 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -449,7 +449,7 @@ class SpecialSearch extends SpecialPage { if ( $title->isKnown() ) { $messageName = 'searchmenu-exists'; - } elseif ( $title->userCan( 'create', $this->getUser() ) ) { + } elseif ( $title->quickUserCan( 'create', $this->getUser() ) ) { $messageName = 'searchmenu-new'; } else { $messageName = 'searchmenu-new-nocreate'; -- 2.20.1