r90248 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90247‎ | r90248 | r90249 >
Date:23:40, 16 June 2011
Author:reedy
Status:ok
Tags:
Comment:
Minor doc fix to r84741

Remove unreachable code from WatchAction

Documentation added to Init.php
Modified paths:
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)
  • /trunk/phase3/includes/Init.php (modified) (history)
  • /trunk/phase3/includes/actions/WatchAction.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -3526,7 +3526,7 @@
35273527 /**
35283528 * Get a cache object.
35293529 *
3530 - * @param integer $inputType Cache type, one the the CACHE_* constants.
 3530+ * @param $inputType integer Cache type, one the the CACHE_* constants.
35313531 * @return BagOStuff
35323532 */
35333533 function wfGetCache( $inputType ) {
Index: trunk/phase3/includes/Init.php
@@ -70,15 +70,20 @@
7171 /**
7272 * The equivalent of MWInit::interpretedPath() but for files relative to the
7373 * extensions directory.
 74+ *
 75+ * @param $file string
 76+ * @return string
7477 */
7578 static function extInterpretedPath( $file ) {
7679 return self::getExtensionsDirectory() . '/' . $file;
7780 }
7881
7982 /**
80 - * The equivalent of MWInit::compiledPath() but for files relative to the
 83+ * The equivalent of MWInit::compiledPath() but for files relative to the
8184 * extensions directory. Any files referenced in this way must be registered
8285 * for compilation by including them in $wgCompiledFiles.
 86+ * @param $file string
 87+ * @return string
8388 */
8489 static function extCompiledPath( $file ) {
8590 if ( defined( 'MW_COMPILED' ) ) {
@@ -95,8 +100,10 @@
96101 *
97102 * require( MWInit::extSetupPath( 'ParserFunctions/ParserFunctions.php' ) );
98103 *
99 - * @param $path The path relative to the extensions directory, as defined by
 104+ * @param $extRel string The path relative to the extensions directory, as defined by
100105 * $wgExtensionsDirectory.
 106+ *
 107+ * @return string
101108 */
102109 static function extSetupPath( $extRel ) {
103110 $baseRel = "extensions/$extRel";
@@ -109,6 +116,9 @@
110117 }
111118 }
112119
 120+ /**
 121+ * @return bool|string
 122+ */
113123 static function getExtensionsDirectory() {
114124 global $wgExtensionsDirectory, $IP;
115125 if ( $wgExtensionsDirectory === false ) {
@@ -160,8 +170,12 @@
161171 }
162172
163173 /**
164 - * Call a static method of a class with variable arguments without causing
 174+ * Call a static method of a class with variable arguments without causing
165175 * it to become volatile.
 176+ * @param $className string
 177+ * @param $methodName string
 178+ * @param $args array
 179+ *
166180 */
167181 static function callStaticMethod( $className, $methodName, $args ) {
168182 $r = new ReflectionMethod( $className, $methodName );
Index: trunk/phase3/includes/actions/WatchAction.php
@@ -50,7 +50,6 @@
5151
5252 if ( !$user->matchEditToken( $this->getRequest()->getVal( 'token' ), $salt ) ) {
5353 throw new ErrorPageError( 'sessionfailure-title', 'sessionfailure' );
54 - return;
5554 }
5655
5756 return parent::checkCanExecute( $user );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r84741Add/update/improve various bits of documentationreedy11:21, 25 March 2011

Status & tagging log