Index: trunk/phase3/includes/ChangesList.php |
— | — | @@ -25,6 +25,7 @@ |
26 | 26 | class ChangesList { |
27 | 27 | # Called by history lists and recent changes |
28 | 28 | public $skin; |
| 29 | + protected $watchlist = false; |
29 | 30 | |
30 | 31 | /** |
31 | 32 | * Changeslist contructor |
— | — | @@ -52,6 +53,14 @@ |
53 | 54 | return $list; |
54 | 55 | } |
55 | 56 | } |
| 57 | + |
| 58 | + /** |
| 59 | + * Sets the list to use a <div class="watchlist-(namespace)-(page)"> tag |
| 60 | + * @param bool $value |
| 61 | + */ |
| 62 | + public function setWatchlistDivs( $value = true ) { |
| 63 | + $this->watchlist = $value; |
| 64 | + } |
56 | 65 | |
57 | 66 | /** |
58 | 67 | * As we use the same small set of messages in various methods and that |
— | — | @@ -447,11 +456,19 @@ |
448 | 457 | $s .= ' ' . wfMsgExt( 'number_of_watching_users_RCview', |
449 | 458 | array( 'parsemag', 'escape' ), $wgLang->formatNum( $rc->numberofWatchingusers ) ); |
450 | 459 | } |
| 460 | + |
| 461 | + if( $this->watchlist ) { |
| 462 | + $watchlist_start = Xml::openElement( 'div', array( 'class' => Sanitizer::escapeClass( 'watchlist-'.$rc->mAttribs['rc_namespace'].'-'.$rc->mAttribs['rc_title'] ) ) ); |
| 463 | + $watchlist_end = Xml::closeElement( 'div' ); |
| 464 | + } |
| 465 | + else { |
| 466 | + $watchlist_start = $watchlist_end = null; |
| 467 | + } |
451 | 468 | |
452 | 469 | wfRunHooks( 'OldChangesListRecentChangesLine', array(&$this, &$s, $rc) ); |
453 | 470 | |
454 | 471 | wfProfileOut( __METHOD__ ); |
455 | | - return "$dateheader<li class=\"".implode( ' ', $classes )."\">$s</li>\n"; |
| 472 | + return "$dateheader<li class=\"".implode( ' ', $classes )."\">".$watchlist_start.$s.$watchlist_end."</li>\n"; |
456 | 473 | } |
457 | 474 | } |
458 | 475 | |
Index: trunk/phase3/includes/specials/SpecialWatchlist.php |
— | — | @@ -334,7 +334,8 @@ |
335 | 335 | $dbr->dataSeek( $res, 0 ); |
336 | 336 | |
337 | 337 | $list = ChangesList::newFromUser( $wgUser ); |
338 | | - |
| 338 | + $list->setWatchlistDivs(); |
| 339 | + |
339 | 340 | $s = $list->beginRecentChangesList(); |
340 | 341 | $counter = 1; |
341 | 342 | while ( $obj = $dbr->fetchObject( $res ) ) { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -54,6 +54,7 @@ |
55 | 55 | * (bug 18466) Add note or warning when overruling a move (semi-)protection |
56 | 56 | * (bug 18342) insertTags works in edit summary box |
57 | 57 | * (bug 18411) The upload form also checks post_max_size |
| 58 | +* Watchlist now has a specialized <div> tag that contains a unique class for each page |
58 | 59 | |
59 | 60 | === Bug fixes in 1.16 === |
60 | 61 | |