From: umherirrender Date: Fri, 27 Dec 2013 18:01:02 +0000 (+0100) Subject: Use Title::isWatchable in ApiWatch X-Git-Tag: 1.31.0-rc.0~17492^2 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=0ffa78679a3425c15d2a582cf996ffe483c09e1b;p=lhc%2Fweb%2Fwiklou.git Use Title::isWatchable in ApiWatch Same checks, but same method as in SpecialEditWatchlist Change-Id: Ic03fc159df9e6322fd0f2d73de4e69b34065d5bb --- diff --git a/includes/api/ApiWatch.php b/includes/api/ApiWatch.php index 7ad286fcf9..759afd72e8 100644 --- a/includes/api/ApiWatch.php +++ b/includes/api/ApiWatch.php @@ -43,7 +43,7 @@ class ApiWatch extends ApiBase { $params = $this->extractRequestParams(); $title = Title::newFromText( $params['title'] ); - if ( !$title || $title->isExternal() || !$title->canExist() ) { + if ( !$title || !$title->isWatchable() ) { $this->dieUsageMsg( array( 'invalidtitle', $params['title'] ) ); }