* @return String
*/
function getPageClasses( $title ) {
+ global $wgRequest;
$numeric = 'ns-' . $title->getNamespace();
if ( $title->getNamespace() == NS_SPECIAL ) {
}
$name = Sanitizer::escapeClass( 'page-' . $title->getPrefixedText() );
-
- return "$numeric $type $name";
+
+ if ( $wgRequest->getVal('action') ) {
+ $action = 'action-' . $wgRequest->getVal('action');
+ } else {
+ $action = 'action-view';
+ }
+ return "$numeric $type $name $action";
}
/**
}
function getCategoryLinks() {
- global $wgUseCategoryBrowser, $wgContLang;
+ global $wgUseCategoryBrowser;
$out = $this->getContext()->getOutput();
return '';
}
- # Separator
- $sep = wfMsgExt( 'catseparator', array( 'parsemag', 'escapenoentities' ) );
-
- // Use Unicode bidi embedding override characters,
- // to make sure links don't smash each other up in ugly ways.
- $dir = $wgContLang->getDir();
- $embed = "<span dir='$dir'>";
- $pop = '</span>';
+ $embed = "<li>";
+ $pop = "</li>";
$allCats = $out->getCategoryLinks();
$s = '';
$colon = wfMsgExt( 'colon-separator', 'escapenoentities' );
if ( !empty( $allCats['normal'] ) ) {
- $t = $embed . implode( "{$pop} {$sep} {$embed}" , $allCats['normal'] ) . $pop;
+ $t = $embed . implode( "{$pop}{$embed}" , $allCats['normal'] ) . $pop;
$msg = wfMsgExt( 'pagecategories', array( 'parsemag', 'escapenoentities' ), count( $allCats['normal'] ) );
$s .= '<div id="mw-normal-catlinks">' .
Linker::link( Title::newFromText( wfMsgForContent( 'pagecategorieslink' ) ), $msg )
- . $colon . $t . '</div>';
+ . $colon . '<ul>' . $t . '</ul>' . '</div>';
}
# Hidden categories
$s .= "<div id=\"mw-hidden-catlinks\" class=\"$class\">" .
wfMsgExt( 'hidden-categories', array( 'parsemag', 'escapenoentities' ), count( $allCats['hidden'] ) ) .
- $colon . $embed . implode( "$pop $sep $embed", $allCats['hidden'] ) . $pop .
+ $colon . '<ul>' . $embed . implode( "{$pop}{$embed}" , $allCats['hidden'] ) . $pop . '</ul>' .
'</div>';
}
if ( $this->getContext()->getUser()->isAllowed( 'deletedhistory' ) &&
( $this->getTitle()->getArticleId() == 0 || $action == 'history' ) ) {
- $n = $this->getTitle()->isDeleted();
+
+ $includeSuppressed = $this->getContext()->getUser()->isAllowed( 'suppressrevision' );
+ $n = $this->getTitle()->isDeleted( $includeSuppressed );
if ( $n ) {
if ( $this->getContext()->getUser()->isAllowed( 'undelete' ) ) {
$bar[$heading][] = array_merge( array(
'text' => $text,
'href' => $href,
- 'id' => 'n-' . strtr( $line[1], ' ', '-' ),
+ 'id' => 'n-' . Sanitizer::escapeId( strtr( $line[1], ' ', '-' ), 'noninitial' ),
'active' => false
), $extraAttribs );
} elseif ( ( substr( $line, 0, 2 ) == '{{' ) && ( substr( $line, -2 ) == '}}' ) ) {
* @return String: HTML fragment
*/
private function getCachedNotice( $name ) {
- global $wgRenderHashAppend, $parserMemc;
+ global $wgRenderHashAppend, $parserMemc, $wgContLang;
wfProfileIn( __METHOD__ );
$notice = $parsed;
}
- $notice = '<div id="localNotice">' .$notice . '</div>';
+ $notice = Html::rawElement( 'div', array( 'id' => 'localNotice',
+ 'lang' => $wgContLang->getCode(), 'dir' => $wgContLang->getDir() ), $notice );
wfProfileOut( __METHOD__ );
return $notice;
}