r113932 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113931‎ | r113932 | r113933 >
Date:17:10, 15 March 2012
Author:reedy
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/wmf/1.19wmf1 (modified) (history)
  • /branches/wmf/1.19wmf1/includes (modified) (history)
  • /branches/wmf/1.19wmf1/includes/SkinTemplate.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.19wmf1/includes/SkinTemplate.php
@@ -397,18 +397,23 @@
398398 $tpl->set( 'bottomscripts', $this->bottomScripts() );
399399 $tpl->set( 'printfooter', $this->printSource() );
400400
401 - # Add a <div class="mw-content-ltr/rtl"> around the body text
 401+ # An ID that includes the actual body text; without categories, contentSub, ...
 402+ $realBodyAttribs = array( 'id' => 'mw-content-text' );
 403+
 404+ # Add a mw-content-ltr/rtl class to be able to style based on text direction
 405+ # when the content is different from the UI language, i.e.:
402406 # not for special pages or file pages AND only when viewing AND if the page exists
403407 # (or is in MW namespace, because that has default content)
404408 if( !in_array( $title->getNamespace(), array( NS_SPECIAL, NS_FILE ) ) &&
405409 in_array( $request->getVal( 'action', 'view' ), array( 'view', 'historysubmit' ) ) &&
406410 ( $title->exists() || $title->getNamespace() == NS_MEDIAWIKI ) ) {
407411 $pageLang = $title->getPageLanguage();
408 - $realBodyAttribs = array( 'lang' => $pageLang->getHtmlCode(), 'dir' => $pageLang->getDir(),
409 - 'class' => 'mw-content-'.$pageLang->getDir() );
410 - $out->mBodytext = Html::rawElement( 'div', $realBodyAttribs, $out->mBodytext );
 412+ $realBodyAttribs['lang'] = $pageLang->getHtmlCode();
 413+ $realBodyAttribs['dir'] = $pageLang->getDir();
 414+ $realBodyAttribs['class'] = 'mw-content-'.$pageLang->getDir();
411415 }
412416
 417+ $out->mBodytext = Html::rawElement( 'div', $realBodyAttribs, $out->mBodytext );
413418 $tpl->setRef( 'bodytext', $out->mBodytext );
414419
415420 # Language links
Property changes on: branches/wmf/1.19wmf1/includes
___________________________________________________________________
Modified: svn:mergeinfo
416421 Merged /trunk/phase3/includes:r111647
Property changes on: branches/wmf/1.19wmf1
___________________________________________________________________
Modified: svn:mergeinfo
417422 Merged /trunk/phase3:r111647

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r111647(Bug 31417) Content-holding div needs an ID....robin16:05, 16 February 2012

Status & tagging log