* The HTML ID's generated for sections are now much prettier when they contain
punctuation or non-English letters, so a section named "Hello?" will now
result in a URL ending in "#Hello?" rather than "#Hello.3F".
+* (bug 8140) Add dedicated CSS classes to Special:Newpages elements
=== Bug fixes in 1.17 ===
* (bug 17560) Half-broken deletion moved image files to deletion archive
$dm = $wgContLang->getDirMark();
$title = Title::makeTitleSafe( $result->rc_namespace, $result->rc_title );
- $time = htmlspecialchars( $wgLang->timeAndDate( $result->rc_timestamp, true ) );
+ $time = Html::rawElement( 'span', array( 'class' => 'mw-newpages-time' ),
+ htmlspecialchars( $wgLang->timeAndDate( $result->rc_timestamp, true ) )
+ );
$query = array( 'redirect' => 'no' );
$plink = $this->skin->linkKnown(
$title,
null,
- array(),
+ array( 'class' => 'mw-newpages-pagename' ),
$query
);
- $hist = $this->skin->linkKnown(
+ $histLink = $this->skin->linkKnown(
$title,
wfMsgHtml( 'hist' ),
array(),
array( 'action' => 'history' )
);
- $length = wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ),
- $wgLang->formatNum( $result->length ) );
+ $hist = Html::rawElement( 'span', array( 'class' => 'mw-newpages-history' ), wfMsg( 'parentheses', $histLink ) );
+
+ $length = Html::rawElement( 'span', array( 'class' => 'mw-newpages-length' ),
+ '[' . wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ), $wgLang->formatNum( $result->length ) ) .
+ ']'
+ );
$ulink = $this->skin->userLink( $result->rc_user, $result->rc_user_text ) . ' ' .
$this->skin->userToolLinks( $result->rc_user, $result->rc_user_text );
$comment = $this->skin->commentBlock( $result->rc_comment );
$css = count($classes) ? ' class="'.implode( " ", $classes).'"' : '';
- return "<li{$css}>{$time} {$dm}{$plink} ({$hist}) {$dm}[{$length}] {$dm}{$ulink} {$comment} {$tagDisplay}</li>\n";
+ return "<li{$css}>{$time} {$dm}{$plink} {$hist} {$dm}{$length} {$dm}{$ulink} {$comment} {$tagDisplay}</li>\n";
}
/**