r83678 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83677‎ | r83678 | r83680 >
Date:23:31, 10 March 2011
Author:reedy
Status:deferred
Tags:
Comment:
Added some documentation whilst looking at issue report
Modified paths:
  • /trunk/extensions/Translate/utils/MessageWebImporter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/utils/MessageWebImporter.php
@@ -21,6 +21,11 @@
2222 protected $code;
2323
2424 /**
 25+ * @var OutputPage
 26+ */
 27+ protected $out;
 28+
 29+ /**
2530 * Maximum processing time in seconds.
2631 */
2732 protected $processingTime = 60;
@@ -31,7 +36,11 @@
3237 $this->setCode( $code );
3338 }
3439
35 - // Wrapper for consistency with SpecialPage
 40+ /**
 41+ * Wrapper for consistency with SpecialPage
 42+ *
 43+ * @return Title
 44+ */
3645 public function getTitle() { return $this->title; }
3746 public function setTitle( Title $title ) { $this->title = $title; }
3847
@@ -45,6 +54,9 @@
4655 $this->user = $user;
4756 }
4857
 58+ /**
 59+ * @return MessageGroup
 60+ */
4961 public function getGroup() {
5062 return $this->group;
5163 }
@@ -182,7 +194,9 @@
183195 $process = false;
184196 } else {
185197 // Check processing time
186 - if ( !isset( $this->time ) ) $this->time = wfTimestamp();
 198+ if ( !isset( $this->time ) ) {
 199+ $this->time = wfTimestamp();
 200+ }
187201
188202 $message = self::doAction(
189203 $action,
@@ -321,6 +335,16 @@
322336 return wfTimestamp() - $this->time >= $this->processingTime;
323337 }
324338
 339+ /**
 340+ * @static
 341+ * @throws MWException
 342+ * @param Title $title
 343+ * @param $message
 344+ * @param $comment
 345+ * @param null $user
 346+ * @param int $editFlags
 347+ * @return array
 348+ */
325349 public static function doImport( $title, $message, $comment, $user = null, $editFlags = 0 ) {
326350 $article = new Article( $title, 0 );
327351 $status = $article->doEdit( $message, $comment, $editFlags, false, $user );
@@ -335,6 +359,15 @@
336360 }
337361 }
338362
 363+ /**
 364+ * @static
 365+ * @param Title $title
 366+ * @param $message
 367+ * @param $comment
 368+ * @param $user
 369+ * @param int $editFlags
 370+ * @return array|String
 371+ */
339372 public static function doFuzzy( $title, $message, $comment, $user, $editFlags = 0 ) {
340373 global $wgUser;
341374

Status & tagging log