r107235 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107234‎ | r107235 | r107236 >
Date:23:11, 24 December 2011
Author:reedy
Status:ok
Tags:
Comment:
Improve/add to documentation

Add braces

Explicitly define member variable
Modified paths:
  • /trunk/phase3/includes/SpecialPage.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialContributions.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserlogin.php (modified) (history)
  • /trunk/phase3/includes/upload/UploadFromUrl.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/upload/UploadFromUrl.php
@@ -7,12 +7,11 @@
88 * @author Bryan Tong Minh
99 * @author Michael Dale
1010 */
11 -
1211 class UploadFromUrl extends UploadBase {
1312 protected $mAsync, $mUrl;
1413 protected $mIgnoreWarnings = true;
1514
16 - protected $mTempPath;
 15+ protected $mTempPath, $mTmpHandle;
1716
1817 /**
1918 * Checks if the user is allowed to use the upload-by-URL feature. If the
@@ -78,6 +77,7 @@
7978
8079 /**
8180 * @param $request WebRequest object
 81+ * @return bool
8282 */
8383 public static function isValidRequest( $request ) {
8484 global $wgUser;
@@ -88,8 +88,14 @@
8989 && $wgUser->isAllowed( 'upload_by_url' );
9090 }
9191
 92+ /**
 93+ * @return string
 94+ */
9295 public function getSourceType() { return 'url'; }
9396
 97+ /**
 98+ * @return Status
 99+ */
94100 public function fetchFile() {
95101 if ( !Http::isValidURI( $this->mUrl ) ) {
96102 return Status::newFatal( 'http-invalid-url' );
@@ -133,6 +139,7 @@
134140 /**
135141 * Download the file, save it to the temporary file and update the file
136142 * size and set $mRemoveTempFile to true.
 143+ * @return Status
137144 */
138145 protected function reallyFetchFile() {
139146 if ( $this->mTempPath === false ) {
Index: trunk/phase3/includes/specials/SpecialUserlogin.php
@@ -1072,8 +1072,9 @@
10731073 # Prepare language selection links as needed
10741074 if( $wgLoginLanguageSelector ) {
10751075 $template->set( 'languages', $this->makeLanguageSelector() );
1076 - if( $this->mLanguage )
 1076+ if( $this->mLanguage ) {
10771077 $template->set( 'uselang', $this->mLanguage );
 1078+ }
10781079 }
10791080
10801081 // Use loginend-https for HTTPS requests if it's not blank, loginend otherwise
Index: trunk/phase3/includes/specials/SpecialContributions.php
@@ -268,6 +268,7 @@
269269 * @param $talkpage Title: Talk page
270270 * @param $target User: Target user object
271271 * @param $subject User: The viewing user ($wgUser might be still checked in some cases)
 272+ * @return array
272273 */
273274 public static function getUserLinks( Title $userpage, Title $talkpage, User $target, User $subject ) {
274275
@@ -716,10 +717,16 @@
717718 return $revLens;
718719 }
719720
 721+ /**
 722+ * @return string
 723+ */
720724 function getStartBody() {
721725 return "<ul>\n";
722726 }
723727
 728+ /**
 729+ * @return string
 730+ */
724731 function getEndBody() {
725732 return "</ul>\n";
726733 }
Index: trunk/phase3/includes/SpecialPage.php
@@ -672,7 +672,7 @@
673673 /**
674674 * Gets the context this SpecialPage is executed in
675675 *
676 - * @return IContextSource
 676+ * @return IContextSource|RequestContext
677677 * @since 1.18
678678 */
679679 public function getContext() {

Status & tagging log