Index: branches/REL1_19/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -22,6 +22,8 @@ |
23 | 23 | * (bug 34889) User name should be normalized on Special:Contributions |
24 | 24 | * (bug 35051) If heading has a trailing space after == then its name is not |
25 | 25 | 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. |
26 | 28 | |
27 | 29 | === Configuration changes in 1.19 === |
28 | 30 | * Removed SkinTemplateSetupPageCss hook; use BeforePageDisplay instead. |
Index: branches/REL1_19/phase3/includes/SkinTemplate.php |
— | — | @@ -397,18 +397,23 @@ |
398 | 398 | $tpl->set( 'bottomscripts', $this->bottomScripts() ); |
399 | 399 | $tpl->set( 'printfooter', $this->printSource() ); |
400 | 400 | |
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.: |
402 | 406 | # not for special pages or file pages AND only when viewing AND if the page exists |
403 | 407 | # (or is in MW namespace, because that has default content) |
404 | 408 | if( !in_array( $title->getNamespace(), array( NS_SPECIAL, NS_FILE ) ) && |
405 | 409 | in_array( $request->getVal( 'action', 'view' ), array( 'view', 'historysubmit' ) ) && |
406 | 410 | ( $title->exists() || $title->getNamespace() == NS_MEDIAWIKI ) ) { |
407 | 411 | $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(); |
411 | 415 | } |
412 | 416 | |
| 417 | + $out->mBodytext = Html::rawElement( 'div', $realBodyAttribs, $out->mBodytext ); |
413 | 418 | $tpl->setRef( 'bodytext', $out->mBodytext ); |
414 | 419 | |
415 | 420 | # Language links |
Property changes on: branches/REL1_19/phase3/includes |
___________________________________________________________________ |
Modified: svn:mergeinfo |
416 | 421 | Merged /trunk/phase3/includes:r111647 |
Property changes on: branches/REL1_19/phase3 |
___________________________________________________________________ |
Modified: svn:mergeinfo |
417 | 422 | Merged /trunk/phase3:r111647 |