From 8f93926e1bc6e96fc11b4d0d201025022d471de7 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Tue, 4 Jan 2011 12:24:29 +0100 Subject: update to MediaWiki 1.16.1 --- includes/api/ApiBase.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'includes/api/ApiBase.php') diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index b703ab4f..708a3a40 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -1005,6 +1005,14 @@ abstract class ApiBase { return false; } + /** + * Returns whether this module requires a Token to execute + * @returns bool + */ + public function needsToken() { + return false; + } + /** * Returns the token salt if there is one, '' if the module doesn't require a salt, else false if the module doesn't need a token * @returns bool @@ -1033,7 +1041,7 @@ abstract class ApiBase { $ret[] = array( 'writedisabled' ); } - if ( $this->getTokenSalt() !== false ) { + if ( $this->needsToken() ) { $ret[] = array( 'missingparam', 'token' ); $ret[] = array( 'sessionfailure' ); } @@ -1184,6 +1192,6 @@ abstract class ApiBase { * @return string */ public static function getBaseVersion() { - return __CLASS__ . ': $Id: ApiBase.php 70066 2010-07-28 05:52:32Z tstarling $'; + return __CLASS__ . ': $Id: ApiBase.php 79562 2011-01-04 06:15:54Z tstarling $'; } } -- cgit v1.2.3-54-g00ecf