From 0ffa78679a3425c15d2a582cf996ffe483c09e1b Mon Sep 17 00:00:00 2001 From: umherirrender Date: Fri, 27 Dec 2013 19:01:02 +0100 Subject: [PATCH] Use Title::isWatchable in ApiWatch Same checks, but same method as in SpecialEditWatchlist Change-Id: Ic03fc159df9e6322fd0f2d73de4e69b34065d5bb --- includes/api/ApiWatch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'] ) ); } -- 2.20.1