]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - includes/api/ApiBase.php
MediaWiki 1.16.1
[autoinstallsdev/mediawiki.git] / includes / api / ApiBase.php
index b703ab4fd9fac7e9daef0364c6ea1fa03deec2e5..708a3a405869feea7f311978134c5db288b91405 100644 (file)
@@ -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 $';
        }
 }