diff options
author | ArtBaltai <art.baltai@speedandfunction.com> | 2020-01-18 23:25:04 +0300 |
---|---|---|
committer | ArtBaltai <art.baltai@speedandfunction.com> | 2020-02-07 00:53:51 +0300 |
commit | 30e54b39626e1be801d7134f903eb10b4ca66341 (patch) | |
tree | a05a3b89cf6c454acdb18a147df2543c995ce061 /includes/specials/SpecialSearch.php | |
parent | 1394d7c8705e3ef9464c5021f08df35847f3af5e (diff) | |
download | mediawikicore-30e54b39626e1be801d7134f903eb10b4ca66341.tar.gz mediawikicore-30e54b39626e1be801d7134f903eb10b4ca66341.zip |
Introduce ContentHandlerFactory
Added:
- ContentHandlerFactory
Tests:
- PHPUnit
Changed
- Calls of changed and deprecated
- DI for some service/api
Deprecated:
- ContentHandler::* then similar to ContentHandlerFactory
- ContentHandler::getForTitle
- ContentHandler::$handlers
Bug: T235165
Change-Id: I59246938c7ad7b3e70e46c9e698708ef9bc672c6
Diffstat (limited to 'includes/specials/SpecialSearch.php')
-rw-r--r-- | includes/specials/SpecialSearch.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 854c6e02eb9b..8d0d2d92cd22 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -543,7 +543,11 @@ class SpecialSearch extends SpecialPage { if ( $title->isKnown() ) { $messageName = 'searchmenu-exists'; $linkClass = 'mw-search-exists'; - } elseif ( ContentHandler::getForTitle( $title )->supportsDirectEditing() + } elseif ( + MediaWikiServices::getInstance() + ->getContentHandlerFactory() + ->getContentHandler( $title->getContentModel() ) + ->supportsDirectEditing() && MediaWikiServices::getInstance()->getPermissionManager()->quickUserCan( 'create', $this->getUser(), $title ) && MediaWikiServices::getInstance()->getPermissionManager()->quickUserCan( 'edit', |