Index: branches/wmf/1.19wmf1/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/wmf/1.19wmf1/includes |
___________________________________________________________________ |
Modified: svn:mergeinfo |
416 | 421 | Merged /trunk/phase3/includes:r111647 |
Property changes on: branches/wmf/1.19wmf1 |
___________________________________________________________________ |
Modified: svn:mergeinfo |
417 | 422 | Merged /trunk/phase3:r111647 |