Replace Title::isWatchable() with WatchlistManager::isWatchable()
Bug: T281497 Change-Id: I947422fa9aa7f26dcd304da2089b8252b60ab4c1
This commit is contained in:
parent
e0ee81aef7
commit
f30f8d43a8
2 changed files with 3 additions and 3 deletions
|
|
@ -104,7 +104,7 @@ class ApiWatch extends ApiBase {
|
|||
}
|
||||
|
||||
$title = Title::newFromText( $params['title'] );
|
||||
if ( !$title || !$title->isWatchable() ) {
|
||||
if ( !$title || !$this->watchlistManager->isWatchable( $title ) ) {
|
||||
$this->dieWithError( [ 'invalidtitle', $params['title'] ] );
|
||||
}
|
||||
$res = $this->watchTitle( $title, $user, $params, true );
|
||||
|
|
@ -120,7 +120,7 @@ class ApiWatch extends ApiBase {
|
|||
) {
|
||||
$res = [ 'title' => $title->getPrefixedText(), 'ns' => $title->getNamespace() ];
|
||||
|
||||
if ( !$title->isWatchable() ) {
|
||||
if ( !$this->watchlistManager->isWatchable( $title ) ) {
|
||||
$res['watchable'] = 0;
|
||||
return $res;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
|
|||
$text = trim( $text );
|
||||
if ( strlen( $text ) > 0 ) {
|
||||
$title = Title::newFromText( $text );
|
||||
if ( $title instanceof Title && $title->isWatchable() ) {
|
||||
if ( $title instanceof Title && $this->watchlistManager->isWatchable( $title ) ) {
|
||||
$titles[] = $title;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue