Index: trunk/extensions/Translate/utils/MessageWebImporter.php |
— | — | @@ -21,6 +21,11 @@ |
22 | 22 | protected $code; |
23 | 23 | |
24 | 24 | /** |
| 25 | + * @var OutputPage |
| 26 | + */ |
| 27 | + protected $out; |
| 28 | + |
| 29 | + /** |
25 | 30 | * Maximum processing time in seconds. |
26 | 31 | */ |
27 | 32 | protected $processingTime = 60; |
— | — | @@ -31,7 +36,11 @@ |
32 | 37 | $this->setCode( $code ); |
33 | 38 | } |
34 | 39 | |
35 | | - // Wrapper for consistency with SpecialPage |
| 40 | + /** |
| 41 | + * Wrapper for consistency with SpecialPage |
| 42 | + * |
| 43 | + * @return Title |
| 44 | + */ |
36 | 45 | public function getTitle() { return $this->title; } |
37 | 46 | public function setTitle( Title $title ) { $this->title = $title; } |
38 | 47 | |
— | — | @@ -45,6 +54,9 @@ |
46 | 55 | $this->user = $user; |
47 | 56 | } |
48 | 57 | |
| 58 | + /** |
| 59 | + * @return MessageGroup |
| 60 | + */ |
49 | 61 | public function getGroup() { |
50 | 62 | return $this->group; |
51 | 63 | } |
— | — | @@ -182,7 +194,9 @@ |
183 | 195 | $process = false; |
184 | 196 | } else { |
185 | 197 | // Check processing time |
186 | | - if ( !isset( $this->time ) ) $this->time = wfTimestamp(); |
| 198 | + if ( !isset( $this->time ) ) { |
| 199 | + $this->time = wfTimestamp(); |
| 200 | + } |
187 | 201 | |
188 | 202 | $message = self::doAction( |
189 | 203 | $action, |
— | — | @@ -321,6 +335,16 @@ |
322 | 336 | return wfTimestamp() - $this->time >= $this->processingTime; |
323 | 337 | } |
324 | 338 | |
| 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 | + */ |
325 | 349 | public static function doImport( $title, $message, $comment, $user = null, $editFlags = 0 ) { |
326 | 350 | $article = new Article( $title, 0 ); |
327 | 351 | $status = $article->doEdit( $message, $comment, $editFlags, false, $user ); |
— | — | @@ -335,6 +359,15 @@ |
336 | 360 | } |
337 | 361 | } |
338 | 362 | |
| 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 | + */ |
339 | 372 | public static function doFuzzy( $title, $message, $comment, $user, $editFlags = 0 ) { |
340 | 373 | global $wgUser; |
341 | 374 | |