r113933 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113932‎ | r113933 | r113934 >
Date:17:12, 15 March 2012
Author:reedy
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/REL1_19/phase3 (modified) (history)
  • /branches/REL1_19/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /branches/REL1_19/phase3/includes (modified) (history)
  • /branches/REL1_19/phase3/includes/SkinTemplate.php (modified) (history)

Diff [purge]

Index: branches/REL1_19/phase3/RELEASE-NOTES-1.19
@@ -22,6 +22,8 @@
2323 * (bug 34889) User name should be normalized on Special:Contributions
2424 * (bug 35051) If heading has a trailing space after == then its name is not
2525 preloaded into edit summary on section edit
 26+* (bug 31417) New ID mw-content-text around the actual page text, without categories,
 27+ contentSub, ... The same div often also contains the class mw-content-ltr/rtl.
2628
2729 === Configuration changes in 1.19 ===
2830 * Removed SkinTemplateSetupPageCss hook; use BeforePageDisplay instead.
Index: branches/REL1_19/phase3/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/REL1_19/phase3/includes
___________________________________________________________________
Modified: svn:mergeinfo
416421 Merged /trunk/phase3/includes:r111647
Property changes on: branches/REL1_19/phase3
___________________________________________________________________
Modified: svn:mergeinfo
417422 Merged /trunk/phase3:r111647

Follow-up revisions

RevisionCommit summaryAuthorDate
r113934Move RELEASE-NOTES after merging r111647 into 1.19 in r113933reedy17:14, 15 March 2012

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