r83458 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83457‎ | r83458 | r83459 >
Date:14:59, 7 March 2011
Author:reedy
Status:ok
Tags:
Comment:
More documentation

Remove trailing whitespace
Modified paths:
  • /trunk/phase3/includes/api/ApiFileRevert.php (modified) (history)
  • /trunk/phase3/includes/api/ApiMove.php (modified) (history)
  • /trunk/phase3/includes/filerepo/LocalRepo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/LocalRepo.php
@@ -18,6 +18,11 @@
1919 var $fileFromRowFactory = array( 'LocalFile', 'newFromRow' );
2020 var $oldFileFromRowFactory = array( 'OldLocalFile', 'newFromRow' );
2121
 22+ /**
 23+ * @throws MWException
 24+ * @param $row
 25+ * @return File
 26+ */
2227 function newFileFromRow( $row ) {
2328 if ( isset( $row->img_name ) ) {
2429 return call_user_func( $this->fileFromRowFactory, $row, $this );
Index: trunk/phase3/includes/api/ApiMove.php
@@ -135,6 +135,13 @@
136136 $this->getResult()->addValue( null, $this->getModuleName(), $r );
137137 }
138138
 139+ /**
 140+ * @param Title $fromTitle
 141+ * @param Title $toTitle
 142+ * @param $reason
 143+ * @param $noredirect
 144+ * @return array
 145+ */
139146 public function moveSubpages( $fromTitle, $toTitle, $reason, $noredirect ) {
140147 $retval = array();
141148 $success = $fromTitle->moveSubpages( $toTitle, true, $reason, !$noredirect );
Index: trunk/phase3/includes/api/ApiFileRevert.php
@@ -39,7 +39,7 @@
4040 */
4141 protected $file;
4242 protected $archiveName;
43 -
 43+
4444 protected $params;
4545
4646 public function __construct( $main, $action ) {
@@ -54,11 +54,11 @@
5555
5656 $this->params = $this->extractRequestParams();
5757 $this->validateParameters();
58 -
5958
 59+
6060 $sourceUrl = $this->file->getArchiveVirtualUrl( $this->archiveName );
6161 $status = $this->file->upload( $sourceUrl, $this->params['comment'], $this->params['comment'] );
62 -
 62+
6363 if ( $status->isGood() ) {
6464 $result = array( 'result' => 'Success' );
6565 } else {
@@ -67,7 +67,7 @@
6868 'errors' => $this->getResult()->convertStatusToArray( $status ),
6969 );
7070 }
71 -
 71+
7272 $this->getResult()->addValue( null, $this->getModuleName(), $result );
7373
7474 }
@@ -88,7 +88,7 @@
8989 }
9090 }
9191 }
92 -
 92+
9393 /**
9494 * Validate the user parameters and set $this->archiveName and $this->file.
9595 * Throws an error if validation fails
@@ -104,7 +104,7 @@
105105 if ( !$this->file->exists() ) {
106106 $this->dieUsageMsg( array( 'notanarticle' ) );
107107 }
108 -
 108+
109109 // Check if the archivename is valid for this file
110110 $this->archiveName = $this->params['archivename'];
111111 $oldFile = RepoGroup::singleton()->getLocalRepo()->newFromArchiveName( $title, $this->archiveName );
@@ -112,8 +112,6 @@
113113 $this->dieUsageMsg( array( 'filerevert-badversion' ) );
114114 }
115115 }
116 -
117 -
118116
119117 public function mustBePosted() {
120118 return true;

Status & tagging log