on Special:Search.
If the linked page is not going to be editable directly,
rather not suggest the user to create it.
Bug: T58032
Change-Id: I28f16c93b8efd9bfa360e3f9c6d6e65e5a927c42
if ( $title->isKnown() ) {
$messageName = 'searchmenu-exists';
$linkClass = 'mw-search-exists';
- } elseif ( $title->quickUserCan( 'create', $this->getUser() ) ) {
+ } elseif ( ContentHandler::getForTitle( $title )->supportsDirectEditing()
+ && $title->quickUserCan( 'create', $this->getUser() )
+ ) {
$messageName = 'searchmenu-new';
}
}