r43330 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r43329‎ | r43330 | r43331 >
Date:18:23, 9 November 2008
Author:vasilievvv
Status:old (Comments)
Tags:
Comment:
Forgot to commit Skin.php part
Modified paths:
  • /trunk/phase3/includes/Skin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Skin.php
@@ -660,6 +660,7 @@
661661 }
662662
663663 function getPageClasses( $title ) {
 664+ global $wgArticle;
664665 $numeric = 'ns-'.$title->getNamespace();
665666 if( $title->getNamespace() == NS_SPECIAL ) {
666667 $type = "ns-special";
@@ -669,7 +670,11 @@
670671 $type = "ns-subject";
671672 }
672673 $name = Sanitizer::escapeClass( 'page-'.$title->getPrefixedText() );
673 - return "$numeric $type $name";
 674+ if( $wgArticle && $wgArticle->isDisambig() )
 675+ $disambig = ' disambiguationpage';
 676+ else
 677+ $disambig = '';
 678+ return "{$numeric} {$type} {$name}{$disambig}";
674679 }
675680
676681 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r43438Revert r43329, r43330 due to said performance issuesaaron08:15, 13 November 2008

Comments

#Comment by Simetrical (talk | contribs)   22:58, 9 November 2008

Is it just me, or does this add a parse on every page view?

#Comment by Voice of All (talk | contribs)   02:26, 10 November 2008

I suspected that too, which is why I skipped this for now.

#Comment by Simetrical (talk | contribs)   23:00, 9 November 2008

Also, new classes should begin with "mw-" and use hyphens to delimit words, so "mw-disambiguation-page" would be a better class name.

#Comment by Aaron Schulz (talk | contribs)   08:16, 13 November 2008

Reverted in r43438

Status & tagging log