From: SQL Date: Sun, 10 Aug 2008 08:29:05 +0000 (+0000) Subject: Bug 15079, 'Add class="ns-talk" / "ns-subject" to ', also added ns-special... X-Git-Tag: 1.31.0-rc.0~45976 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=commitdiff_plain;h=e1ee4e81d52dfb5969417f334243759db96f710a;p=lhc%2Fweb%2Fwiklou.git Bug 15079, 'Add class="ns-talk" / "ns-subject" to ', also added ns-special for special pages. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 2d6400c40c..10b0acfcaa 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -89,6 +89,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN entirely, not just the display of it. * (bug 6387) Introduced new setting $wgCategoryPrefixedDefaultSortkey which allows having the unprefixed page title as the default category sortkey +* (bug 15079) Add class="ns-talk" / "ns-subject" to . Also added ns-special to + special pages. === API changes in 1.14 === diff --git a/includes/Skin.php b/includes/Skin.php index 39d5c57842..6bb0dc05de 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -589,8 +589,9 @@ END; $a['onload'] = $wgOut->getOnloadHandler(); $a['class'] = 'mediawiki ns-'.$wgTitle->getNamespace(). - ' '.($wgContLang->isRTL() ? "rtl" : "ltr"). - ' '.Sanitizer::escapeClass( 'page-'.$wgTitle->getPrefixedText() ); + ' '.( $wgContLang->isRTL() ? "rtl" : "ltr" ). + ' '.Sanitizer::escapeClass( 'page-'.$wgTitle->getPrefixedText() ). + ' '.( $wgTitle->isTalkPage() ? "ns-talk" : ( $wgTitle->isTalkPage() ? "ns-talk" : ( $wgTitle->getNamespace() == NS_SPECIAL ? "ns-special" : "ns-subject" ) ) ); return $a; } diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index d1b2af670e..85871dcaba 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -192,6 +192,7 @@ class SkinTemplate extends Skin { $tpl->set( 'pagetitle', $wgOut->getHTMLTitle() ); $tpl->set( 'displaytitle', $wgOut->mPageLinkTitle ); $tpl->set( 'pageclass', Sanitizer::escapeClass( 'page-'.$this->mTitle->getPrefixedText() ) ); + $tpl->set( 'talkclass', ( $wgTitle->isTalkPage() ? "ns-talk" : ( $wgTitle->getNamespace() == NS_SPECIAL ? "ns-special" : "ns-subject" ) ) ); $nsname = isset( $wgCanonicalNamespaceNames[ $this->mTitle->getNamespace() ] ) ? $wgCanonicalNamespaceNames[ $this->mTitle->getNamespace() ] : diff --git a/skins/Modern.php b/skins/Modern.php index a7c29a5480..b0194d6b0e 100644 --- a/skins/Modern.php +++ b/skins/Modern.php @@ -95,7 +95,7 @@ class ModernTemplate extends QuickTemplate { data['body_ondblclick']) { ?> ondblclick="text('body_ondblclick') ?>" data['body_onload' ]) { ?> onload="text('body_onload') ?>" - class="mediawiki text('nsclass') ?> text('dir') ?> text('pageclass') ?>"> + class="mediawiki text('nsclass') ?> text('dir') ?> text('pageclass') ?> text('talkclass') ?>">

data['displaytitle']!=""?$this->html('title'):$this->text('title') ?>

diff --git a/skins/MonoBook.php b/skins/MonoBook.php index a79825f13d..bfbc6c6c8f 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -104,7 +104,7 @@ class MonoBookTemplate extends QuickTemplate { data['body_ondblclick']) { ?> ondblclick="text('body_ondblclick') ?>" data['body_onload']) { ?> onload="text('body_onload') ?>" - class="mediawiki text('nsclass') ?> text('dir') ?> text('pageclass') ?>"> + class="mediawiki text('nsclass') ?> text('dir') ?> text('pageclass') ?> text('talkclass') ?>">