Minor doc fix to r84741
authorSam Reed <reedy@users.mediawiki.org>
Thu, 16 Jun 2011 23:40:13 +0000 (23:40 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Thu, 16 Jun 2011 23:40:13 +0000 (23:40 +0000)
Remove unreachable code from WatchAction

Documentation added to Init.php

includes/GlobalFunctions.php
includes/Init.php
includes/actions/WatchAction.php

index 2263507..4bd5809 100644 (file)
@@ -3526,7 +3526,7 @@ function wfBCP47( $code ) {
 /**
  * Get a cache object.
  *
- * @param integer $inputType Cache type, one the the CACHE_* constants.
+ * @param $inputType integer Cache type, one the the CACHE_* constants.
  * @return BagOStuff
  */
 function wfGetCache( $inputType ) {
index ac55181..de86728 100644 (file)
@@ -70,15 +70,20 @@ class MWInit {
        /**
         * The equivalent of MWInit::interpretedPath() but for files relative to the
         * extensions directory.
+        *
+        * @param $file string
+        * @return string
         */
        static function extInterpretedPath( $file ) {
                return self::getExtensionsDirectory() . '/' . $file;
        }
 
        /**
-        * The equivalent of MWInit::compiledPath() but for files relative to the 
+        * The equivalent of MWInit::compiledPath() but for files relative to the
         * extensions directory. Any files referenced in this way must be registered
         * for compilation by including them in $wgCompiledFiles.
+        * @param $file string
+        * @return string
         */
        static function extCompiledPath( $file ) {
                if ( defined( 'MW_COMPILED' ) ) {
@@ -95,8 +100,10 @@ class MWInit {
         *
         *    require( MWInit::extSetupPath( 'ParserFunctions/ParserFunctions.php' ) );
         *
-        * @param $path The path relative to the extensions directory, as defined by 
+        * @param $extRel string The path relative to the extensions directory, as defined by
         *   $wgExtensionsDirectory.
+        *
+        * @return string
         */
        static function extSetupPath( $extRel ) {
                $baseRel = "extensions/$extRel";
@@ -109,6 +116,9 @@ class MWInit {
                }
        }
 
+       /**
+        * @return bool|string
+        */
        static function getExtensionsDirectory() {
                global $wgExtensionsDirectory, $IP;
                if ( $wgExtensionsDirectory === false ) {
@@ -160,8 +170,12 @@ class MWInit {
        }
 
        /**
-        * Call a static method of a class with variable arguments without causing 
+        * Call a static method of a class with variable arguments without causing
         * it to become volatile.
+        * @param $className string
+        * @param $methodName string
+        * @param $args array
+        *
         */
        static function callStaticMethod( $className, $methodName, $args ) {
                $r = new ReflectionMethod( $className, $methodName );
index cce0b15..94ad1cc 100644 (file)
@@ -50,7 +50,6 @@ class WatchAction extends FormlessAction {
 
                if ( !$user->matchEditToken( $this->getRequest()->getVal( 'token' ), $salt ) ) {
                        throw new ErrorPageError( 'sessionfailure-title', 'sessionfailure' );
-                       return;
                }
                
                return parent::checkCanExecute( $user );