* (bug 11644) Add $wgMaxRedirects variable to control how many redirects are recursed
through until the "destination" page is reached.
* Add $wgInvalidRedirectTargets variable to prevent redirects to certain special pages.
+* Use HTML5 rel attributes for some links, where appropriate
=== Bug fixes in 1.15 ===
* (bug 16968) Special:Upload no longer throws useless warnings.
if ( $query === null ) {
return $text;
}
- if( $type == 'prev' || $type == 'next' ) {
- $attrs = "rel=\"$type\"";
- } elseif( $type == 'first' ) {
- $attrs = "rel=\"start\"";
- } else {
- # HTML 4 has no rel="end" . . .
- $attrs = '';
+
+ $attrs = array();
+ if( in_array( $type, array( 'first', 'prev', 'next', 'last' ) ) ) {
+ # HTML5 rel attributes
+ $attrs['rel'] = $type;
}
if( $type ) {
- $attrs .= " class=\"mw-{$type}link\"" ;
+ $attrs['class'] = "mw-{$type}link";
}
- return $this->getSkin()->makeKnownLinkObj( $this->getTitle(), $text,
- wfArrayToCGI( $query, $this->getDefaultQuery() ), '', '', $attrs );
+ return $this->getSkin()->link( $this->getTitle(), $text,
+ $attrs, $query + $this->getDefaultQuery(), 'known' );
}
/**
function historyLink() {
global $wgTitle;
- return $this->makeKnownLinkObj( $wgTitle,
- wfMsg( 'history' ), 'action=history' );
+ return $this->link( $wgTitle, wfMsg( 'history' ),
+ array( 'rel' => 'archives' ), array( 'action' => 'history' ) );
}
function whatLinksHere() {
$content_actions['history'] = array(
'class' => ($action == 'history') ? 'selected' : false,
'text' => wfMsg('history_short'),
- 'href' => $this->mTitle->getLocalUrl( 'action=history')
+ 'href' => $this->mTitle->getLocalUrl( 'action=history' ),
+ 'rel' => 'archives',
);
if( $wgUser->isAllowed('delete') ) {