diff options
Diffstat (limited to 'includes/api/ApiExpandTemplates.php')
-rw-r--r-- | includes/api/ApiExpandTemplates.php | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/includes/api/ApiExpandTemplates.php b/includes/api/ApiExpandTemplates.php index 160f5b91..f5898fb3 100644 --- a/includes/api/ApiExpandTemplates.php +++ b/includes/api/ApiExpandTemplates.php @@ -33,10 +33,6 @@ */ class ApiExpandTemplates extends ApiBase { - public function __construct( $main, $action ) { - parent::__construct( $main, $action ); - } - public function execute() { // Cache may vary on $wgUser because ParserOptions gets data from it $this->getMain()->setCacheMode( 'anon-public-user-private' ); @@ -46,7 +42,7 @@ class ApiExpandTemplates extends ApiBase { // Create title for parser $title_obj = Title::newFromText( $params['title'] ); - if ( !$title_obj ) { + if ( !$title_obj || $title_obj->isExternal() ) { $this->dieUsageMsg( array( 'invalidtitle', $params['title'] ) ); } @@ -130,8 +126,4 @@ class ApiExpandTemplates extends ApiBase { public function getHelpUrls() { return 'https://www.mediawiki.org/wiki/API:Parsing_wikitext#expandtemplates'; } - - public function getVersion() { - return __CLASS__ . ': $Id$'; - } } |