r91648 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91647‎ | r91648 | r91649 >
Date:16:15, 7 July 2011
Author:robin
Status:ok (Comments)
Tags:
Comment:
(Update for r91646) Use mw-content-ltr/rtl so bullet list shows properly where user direction != site direction. Also add lang & dir attribute, and fix typo in shared.css.
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/skins/common/shared.css (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/shared.css
@@ -771,7 +771,7 @@
772772 unicode-bidi: embed;
773773 }
774774
775 -#mw-clearyourcache, #mw-sitecsspreview, #mw-sitejsspreview, #mw-usercsspreview, #mw-userjspreview {
 775+#mw-clearyourcache, #mw-sitecsspreview, #mw-sitejspreview, #mw-usercsspreview, #mw-userjspreview {
776776 direction: ltr;
777777 unicode-bidi: embed;
778778 }
Index: trunk/phase3/includes/Article.php
@@ -609,10 +609,14 @@
610610 * page views.
611611 */
612612 protected function showCssOrJsPage() {
613 - global $wgOut;
 613+ global $wgOut, $wgLang;
614614
615 - $wgOut->wrapWikiMsg( "<div id='mw-clearyourcache'>\n$1\n</div>", 'clearyourcache' );
 615+ $dir = $wgLang->getDir();
 616+ $lang = $wgLang->getCode();
616617
 618+ $wgOut->wrapWikiMsg( "<div id='mw-clearyourcache' lang='$lang' dir='$dir' class='mw-content-$dir'>\n$1\n</div>",
 619+ 'clearyourcache' );
 620+
617621 // Give hooks a chance to customise the output
618622 if ( wfRunHooks( 'ShowRawCssJs', array( $this->mContent, $this->getTitle(), $wgOut ) ) ) {
619623 // Wrap the whole lot in a <pre> and don't parse

Follow-up revisions

RevisionCommit summaryAuthorDate
r92702Use $this->getLang() per Nikerabbit on r91648.robin22:31, 20 July 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r91646Rephrasing msg clearyourcache per Bug 27550 : Adding Chrome, moving up IE, ma...diebuche15:59, 7 July 2011

Comments

#Comment by Nikerabbit (talk | contribs)   13:40, 20 July 2011

Could use $this->getLang(), or was that added only after this?

#Comment by SPQRobin (talk | contribs)   22:33, 20 July 2011

Don't know when it was added. In any case I used getLang() in r92702.

Status & tagging log