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
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';