Index: trunk/phase3/includes/Wiki.php |
— | — | @@ -38,18 +38,29 @@ |
39 | 39 | */ |
40 | 40 | private $performedAction = 'nosuchaction'; |
41 | 41 | |
| 42 | + /** |
| 43 | + * @param $x null|WebRequest |
| 44 | + * @return WebRequest |
| 45 | + */ |
42 | 46 | public function request( WebRequest $x = null ) { |
43 | 47 | $old = $this->context->getRequest(); |
44 | 48 | $this->context->setRequest( $x ); |
45 | 49 | return $old; |
46 | 50 | } |
47 | 51 | |
| 52 | + /** |
| 53 | + * @param $x null|OutputPage |
| 54 | + * @return OutputPage |
| 55 | + */ |
48 | 56 | public function output( OutputPage $x = null ) { |
49 | 57 | $old = $this->context->getOutput(); |
50 | 58 | $this->context->setOutput( $x ); |
51 | 59 | return $old; |
52 | 60 | } |
53 | 61 | |
| 62 | + /** |
| 63 | + * @param IContextSource|null $context |
| 64 | + */ |
54 | 65 | public function __construct( IContextSource $context = null ) { |
55 | 66 | if ( !$context ) { |
56 | 67 | $context = RequestContext::getMain(); |
— | — | @@ -577,6 +588,7 @@ |
578 | 589 | /** |
579 | 590 | * Checks if the request should abort due to a lagged server, |
580 | 591 | * for given maxlag parameter. |
| 592 | + * @return bool |
581 | 593 | */ |
582 | 594 | private function checkMaxLag() { |
583 | 595 | global $wgShowHostnames; |
Index: trunk/phase3/includes/ChangesList.php |
— | — | @@ -259,7 +259,6 @@ |
260 | 260 | * @param $s |
261 | 261 | * @param $rc RecentChange |
262 | 262 | * @param $unpatrolled |
263 | | - * @return void |
264 | 263 | */ |
265 | 264 | public function insertDiffHist( &$s, &$rc, $unpatrolled ) { |
266 | 265 | # Diff link |
— | — | @@ -304,7 +303,6 @@ |
305 | 304 | * @param $rc RecentChange |
306 | 305 | * @param $unpatrolled |
307 | 306 | * @param $watched |
308 | | - * @return void |
309 | 307 | */ |
310 | 308 | public function insertArticleLink( &$s, &$rc, $unpatrolled, $watched ) { |
311 | 309 | # If it's a new article, there is no diff link, but if it hasn't been |
— | — | @@ -340,7 +338,6 @@ |
341 | 339 | /** |
342 | 340 | * @param $s |
343 | 341 | * @param $rc RecentChange |
344 | | - * @return void |
345 | 342 | */ |
346 | 343 | public function insertTimestamp( &$s, $rc ) { |
347 | 344 | $s .= $this->message['semicolon-separator'] . |
— | — | @@ -355,12 +352,14 @@ |
356 | 353 | if( $this->isDeleted( $rc, Revision::DELETED_USER ) ) { |
357 | 354 | $s .= ' <span class="history-deleted">' . wfMsgHtml( 'rev-deleted-user' ) . '</span>'; |
358 | 355 | } else { |
359 | | - $s .= $this->getLanguage()->getDirMark() . Linker::userLink( $rc->mAttribs['rc_user'], $rc->mAttribs['rc_user_text'] ); |
| 356 | + $s .= $this->getLanguage()->getDirMark() . Linker::userLink( $rc->mAttribs['rc_user'], |
| 357 | + $rc->mAttribs['rc_user_text'] ); |
360 | 358 | $s .= Linker::userToolLinks( $rc->mAttribs['rc_user'], $rc->mAttribs['rc_user_text'] ); |
361 | 359 | } |
362 | 360 | } |
363 | 361 | |
364 | | - /** insert a formatted action |
| 362 | + /** |
| 363 | + * insert a formatted action |
365 | 364 | * |
366 | 365 | * @param $rc RecentChange |
367 | 366 | */ |
— | — | @@ -436,6 +435,11 @@ |
437 | 436 | } |
438 | 437 | } |
439 | 438 | |
| 439 | + /** |
| 440 | + * @param $link string |
| 441 | + * @param $watched bool |
| 442 | + * @return string |
| 443 | + */ |
440 | 444 | protected function maybeWatchedLink( $link, $watched = false ) { |
441 | 445 | if( $watched ) { |
442 | 446 | return '<strong class="mw-watched">' . $link . '</strong>'; |
— | — | @@ -607,6 +611,9 @@ |
608 | 612 | * Generate a list of changes using an Enhanced system (uses javascript). |
609 | 613 | */ |
610 | 614 | class EnhancedChangesList extends ChangesList { |
| 615 | + |
| 616 | + protected $rc_cache; |
| 617 | + |
611 | 618 | /** |
612 | 619 | * Add the JavaScript file for enhanced changeslist |
613 | 620 | * @return String |
— | — | @@ -779,9 +786,11 @@ |
780 | 787 | # Add the namespace and title of the block as part of the class |
781 | 788 | if ( $block[0]->mAttribs['rc_log_type'] ) { |
782 | 789 | # Log entry |
783 | | - $classes = 'mw-collapsible mw-collapsed mw-enhanced-rc ' . Sanitizer::escapeClass( 'mw-changeslist-log-' . $block[0]->mAttribs['rc_log_type'] . '-' . $block[0]->mAttribs['rc_title'] ); |
| 790 | + $classes = 'mw-collapsible mw-collapsed mw-enhanced-rc ' . Sanitizer::escapeClass( 'mw-changeslist-log-' |
| 791 | + . $block[0]->mAttribs['rc_log_type'] . '-' . $block[0]->mAttribs['rc_title'] ); |
784 | 792 | } else { |
785 | | - $classes = 'mw-collapsible mw-collapsed mw-enhanced-rc ' . Sanitizer::escapeClass( 'mw-changeslist-ns' . $block[0]->mAttribs['rc_namespace'] . '-' . $block[0]->mAttribs['rc_title'] ); |
| 793 | + $classes = 'mw-collapsible mw-collapsed mw-enhanced-rc ' . Sanitizer::escapeClass( 'mw-changeslist-ns' |
| 794 | + . $block[0]->mAttribs['rc_namespace'] . '-' . $block[0]->mAttribs['rc_title'] ); |
786 | 795 | } |
787 | 796 | $r = Html::openElement( 'table', array( 'class' => $classes ) ) . |
788 | 797 | Html::openElement( 'tr' ); |
— | — | @@ -1094,9 +1103,11 @@ |
1095 | 1104 | $logType = $rcObj->mAttribs['rc_log_type']; |
1096 | 1105 | if( $logType ) { |
1097 | 1106 | # Log entry |
1098 | | - $classes = 'mw-enhanced-rc ' . Sanitizer::escapeClass( 'mw-changeslist-log-' . $logType . '-' . $rcObj->mAttribs['rc_title'] ); |
| 1107 | + $classes = 'mw-enhanced-rc ' . Sanitizer::escapeClass( 'mw-changeslist-log-' |
| 1108 | + . $logType . '-' . $rcObj->mAttribs['rc_title'] ); |
1099 | 1109 | } else { |
1100 | | - $classes = 'mw-enhanced-rc ' . Sanitizer::escapeClass( 'mw-changeslist-ns' . $rcObj->mAttribs['rc_namespace'] . '-' . $rcObj->mAttribs['rc_title'] ); |
| 1110 | + $classes = 'mw-enhanced-rc ' . Sanitizer::escapeClass( 'mw-changeslist-ns' . |
| 1111 | + $rcObj->mAttribs['rc_namespace'] . '-' . $rcObj->mAttribs['rc_title'] ); |
1101 | 1112 | } |
1102 | 1113 | $r = Html::openElement( 'table', array( 'class' => $classes ) ) . |
1103 | 1114 | Html::openElement( 'tr' ); |
— | — | @@ -1190,6 +1201,7 @@ |
1191 | 1202 | /** |
1192 | 1203 | * Returns text for the end of RC |
1193 | 1204 | * If enhanced RC is in use, returns pretty much all the text |
| 1205 | + * @return string |
1194 | 1206 | */ |
1195 | 1207 | public function endRecentChangesList() { |
1196 | 1208 | return $this->recentChangesBlock() . parent::endRecentChangesList(); |