Index: trunk/phase3/skins/Vector.php |
— | — | @@ -463,9 +463,9 @@ |
464 | 464 | <div id="page-base" class="noprint"></div> |
465 | 465 | <div id="head-base" class="noprint"></div> |
466 | 466 | <!-- content --> |
467 | | - <div id="content"> |
| 467 | + <div id="content" <?php $this->html('specialpageattributes') ?>> |
468 | 468 | <a id="top"></a> |
469 | | - <div id="mw-js-message" style="display:none;"></div> |
| 469 | + <div id="mw-js-message" style="display:none;" <?php $this->html('userlangattributes') ?>></div> |
470 | 470 | <?php if ( $this->data['sitenotice'] ): ?> |
471 | 471 | <!-- sitenotice --> |
472 | 472 | <div id="siteNotice"><?php $this->html( 'sitenotice' ) ?></div> |
— | — | @@ -480,7 +480,7 @@ |
481 | 481 | <h3 id="siteSub"><?php $this->msg( 'tagline' ) ?></h3> |
482 | 482 | <!-- /tagline --> |
483 | 483 | <!-- subtitle --> |
484 | | - <div id="contentSub"><?php $this->html( 'subtitle' ) ?></div> |
| 484 | + <div id="contentSub" <?php $this->html('userlangattributes') ?>><?php $this->html( 'subtitle' ) ?></div> |
485 | 485 | <!-- /subtitle --> |
486 | 486 | <?php if ( $this->data['undelete'] ): ?> |
487 | 487 | <!-- undelete --> |
— | — | @@ -538,7 +538,7 @@ |
539 | 539 | </div> |
540 | 540 | <!-- /panel --> |
541 | 541 | <!-- footer --> |
542 | | - <div id="footer"> |
| 542 | + <div id="footer" <?php $this->html('userlangattributes') ?>> |
543 | 543 | <?php foreach( $validFooterLinks as $category => $links ): ?> |
544 | 544 | <?php if ( count( $links ) > 0 ): ?> |
545 | 545 | <ul id="footer-<?php echo $category ?>"> |
Index: trunk/phase3/skins/MonoBook.php |
— | — | @@ -81,13 +81,13 @@ |
82 | 82 | class="mediawiki <?php $this->text('dir'); $this->text('capitalizeallnouns') ?> <?php $this->text('pageclass') ?> <?php $this->text('skinnameclass') ?>"> |
83 | 83 | <div id="globalWrapper"> |
84 | 84 | <div id="column-content"> |
85 | | - <div id="content"> |
| 85 | + <div id="content" <?php $this->html("specialpageattributes") ?>> |
86 | 86 | <a id="top"></a> |
87 | 87 | <?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?> |
88 | 88 | <h1 id="firstHeading" class="firstHeading"><?php $this->html('title') ?></h1> |
89 | 89 | <div id="bodyContent"> |
90 | 90 | <h3 id="siteSub"><?php $this->msg('tagline') ?></h3> |
91 | | - <div id="contentSub"><?php $this->html('subtitle') ?></div> |
| 91 | + <div id="contentSub" <?php $this->html('userlangattributes') ?>><?php $this->html('subtitle') ?></div> |
92 | 92 | <?php if($this->data['undelete']) { ?><div id="contentSub2"><?php $this->html('undelete') ?></div><?php } ?> |
93 | 93 | <?php if($this->data['newtalk'] ) { ?><div class="usermessage"><?php $this->html('newtalk') ?></div><?php } ?> |
94 | 94 | <?php if($this->data['showjumplinks']) { ?><div id="jump-to-nav"><?php $this->msg('jumpto') ?> <a href="#column-one"><?php $this->msg('jumptonavigation') ?></a>, <a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div><?php } ?> |
— | — | @@ -100,11 +100,11 @@ |
101 | 101 | </div> |
102 | 102 | </div> |
103 | 103 | </div> |
104 | | - <div id="column-one"> |
| 104 | + <div id="column-one" <?php $this->html('userlangattributes') ?>> |
105 | 105 | <div id="p-cactions" class="portlet"> |
106 | 106 | <h5><?php $this->msg('views') ?></h5> |
107 | 107 | <div class="pBody"> |
108 | | - <ul <?php $this->html('userlangattributes') ?>> |
| 108 | + <ul> |
109 | 109 | <?php foreach($this->data['content_actions'] as $key => $tab) { |
110 | 110 | echo ' |
111 | 111 | <li id="' . Sanitizer::escapeId( "ca-$key" ) . '"'; |
— | — | @@ -169,7 +169,7 @@ |
170 | 170 | ?> |
171 | 171 | </div><!-- end of the left (by default at least) column --> |
172 | 172 | <div class="visualClear"></div> |
173 | | - <div id="footer"> |
| 173 | + <div id="footer" <?php $this->html('userlangattributes') ?>> |
174 | 174 | <?php |
175 | 175 | if($this->data['poweredbyico']) { ?> |
176 | 176 | <div id="f-poweredbyico"><?php $this->html('poweredbyico') ?></div> |
— | — | @@ -221,7 +221,7 @@ |
222 | 222 | global $wgUseTwoButtonsSearchForm; |
223 | 223 | ?> |
224 | 224 | <div id="p-search" class="portlet"> |
225 | | - <h5 <?php $this->html('userlangattributes') ?>><label for="searchInput"><?php $this->msg('search') ?></label></h5> |
| 225 | + <h5><label for="searchInput"><?php $this->msg('search') ?></label></h5> |
226 | 226 | <div id="searchBody" class="pBody"> |
227 | 227 | <form action="<?php $this->text('wgScript') ?>" id="searchform"> |
228 | 228 | <input type='hidden' name="title" value="<?php $this->text('searchtitle') ?>"/> |
— | — | @@ -249,7 +249,7 @@ |
250 | 250 | function toolbox() { |
251 | 251 | ?> |
252 | 252 | <div class="portlet" id="p-tb"> |
253 | | - <h5 <?php $this->html('userlangattributes')?>><?php $this->msg('toolbox') ?></h5> |
| 253 | + <h5><?php $this->msg('toolbox') ?></h5> |
254 | 254 | <div class="pBody"> |
255 | 255 | <ul> |
256 | 256 | <?php |
— | — | @@ -328,7 +328,7 @@ |
329 | 329 | function customBox( $bar, $cont ) { |
330 | 330 | ?> |
331 | 331 | <div class='generated-sidebar portlet' id='<?php echo Sanitizer::escapeId( "p-$bar" ) ?>'<?php echo $this->skin->tooltip('p-'.$bar) ?>> |
332 | | - <h5 <?php $this->html('userlangattributes') ?>><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo htmlspecialchars($bar); else echo htmlspecialchars($out); ?></h5> |
| 332 | + <h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo htmlspecialchars($bar); else echo htmlspecialchars($out); ?></h5> |
333 | 333 | <div class='pBody'> |
334 | 334 | <?php if ( is_array( $cont ) ) { ?> |
335 | 335 | <ul> |
Index: trunk/phase3/skins/Modern.php |
— | — | @@ -20,7 +20,7 @@ |
21 | 21 | $template = 'ModernTemplate', $useHeadElement = true; |
22 | 22 | |
23 | 23 | /* |
24 | | - * We don't like the default getPoweredBy, the icon clashes with the |
| 24 | + * We don't like the default getPoweredBy, the icon clashes with the |
25 | 25 | * skin L&F. |
26 | 26 | */ |
27 | 27 | function getPoweredBy() { |
— | — | @@ -113,9 +113,9 @@ |
114 | 114 | <!-- contentholder does nothing by default, but it allows users to style the text inside |
115 | 115 | the content area without affecting the meaning of 'em' in #mw_content, which is used |
116 | 116 | for the margins --> |
117 | | - <div id="mw_contentholder"> |
| 117 | + <div id="mw_contentholder" <?php $this->html("specialpageattributes") ?>> |
118 | 118 | <div class='mw-topboxes'> |
119 | | - <div id="mw-js-message" style="display:none;"></div> |
| 119 | + <div id="mw-js-message" style="display:none;" <?php $this->html('userlangattributes')?>></div> |
120 | 120 | <div class="mw-topbox" id="siteSub"><?php $this->msg('tagline') ?></div> |
121 | 121 | <?php if($this->data['newtalk'] ) { |
122 | 122 | ?><div class="usermessage mw-topbox"><?php $this->html('newtalk') ?></div> |
— | — | @@ -125,7 +125,7 @@ |
126 | 126 | <?php } ?> |
127 | 127 | </div> |
128 | 128 | |
129 | | - <div id="contentSub"><?php $this->html('subtitle') ?></div> |
| 129 | + <div id="contentSub" <?php $this->html('userlangattributes') ?>><?php $this->html('subtitle') ?></div> |
130 | 130 | |
131 | 131 | <?php if($this->data['undelete']) { ?><div id="contentSub2"><?php $this->html('undelete') ?></div><?php } ?> |
132 | 132 | <?php if($this->data['showjumplinks']) { ?><div id="jump-to-nav"><?php $this->msg('jumpto') ?> <a href="#mw_portlets"><?php $this->msg('jumptonavigation') ?></a>, <a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div><?php } ?> |
— | — | @@ -138,11 +138,11 @@ |
139 | 139 | </div><!-- mw_content --> |
140 | 140 | </div><!-- mw_contentwrapper --> |
141 | 141 | |
142 | | - <div id="mw_portlets"> |
| 142 | + <div id="mw_portlets" <?php $this->html("userlangattributes") ?>> |
143 | 143 | |
144 | 144 | <!-- portlets --> |
145 | | - <?php |
146 | | - $sidebar = $this->data['sidebar']; |
| 145 | + <?php |
| 146 | + $sidebar = $this->data['sidebar']; |
147 | 147 | if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true; |
148 | 148 | if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true; |
149 | 149 | if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true; |
— | — | @@ -185,8 +185,8 @@ |
186 | 186 | </div> |
187 | 187 | |
188 | 188 | |
189 | | - <!-- footer --> |
190 | | - <div id="footer"> |
| 189 | + <!-- footer --> |
| 190 | + <div id="footer" <?php $this->html('userlangattributes') ?>> |
191 | 191 | <ul id="f-list"> |
192 | 192 | <?php |
193 | 193 | $footerlinks = array( |
— | — | @@ -335,7 +335,7 @@ |
336 | 336 | <?php } else { |
337 | 337 | # allow raw HTML block to be defined by extensions |
338 | 338 | print $cont; |
339 | | - } |
| 339 | + } |
340 | 340 | ?> |
341 | 341 | </div> |
342 | 342 | </div> |
Index: trunk/phase3/includes/Linker.php |
— | — | @@ -110,7 +110,7 @@ |
111 | 111 | if ( $t->isRedirect() ) { |
112 | 112 | # Page is a redirect |
113 | 113 | $colour = 'mw-redirect'; |
114 | | - } elseif ( $threshold > 0 && |
| 114 | + } elseif ( $threshold > 0 && |
115 | 115 | $t->exists() && $t->getLength() < $threshold && |
116 | 116 | MWNamespace::isContent( $t->getNamespace() ) ) { |
117 | 117 | # Page is a stub |
— | — | @@ -369,7 +369,7 @@ |
370 | 370 | } |
371 | 371 | } |
372 | 372 | |
373 | | - /** |
| 373 | + /** |
374 | 374 | * Returns the filename part of an url. |
375 | 375 | * Used as alternative text for external images. |
376 | 376 | */ |
— | — | @@ -383,7 +383,7 @@ |
384 | 384 | return $basename; |
385 | 385 | } |
386 | 386 | |
387 | | - /** |
| 387 | + /** |
388 | 388 | * Return the code for images which were added via external links, |
389 | 389 | * via Parser::maybeMakeExternalImage(). |
390 | 390 | */ |
— | — | @@ -621,7 +621,7 @@ |
622 | 622 | # So we don't need to pass it here in $query. However, the URL for the |
623 | 623 | # zoom icon still needs it, so we make a unique query for it. See bug 14771 |
624 | 624 | $url = $title->getLocalURL( $query ); |
625 | | - if( $page ) { |
| 625 | + if( $page ) { |
626 | 626 | $url = wfAppendQuery( $url, 'page=' . urlencode( $page ) ); |
627 | 627 | } |
628 | 628 | |
— | — | @@ -692,7 +692,7 @@ |
693 | 693 | } |
694 | 694 | |
695 | 695 | list( $inside, $trail ) = self::splitTrail( $trail ); |
696 | | - |
| 696 | + |
697 | 697 | wfProfileOut( __METHOD__ ); |
698 | 698 | return Html::element( 'a', array( |
699 | 699 | 'href' => $href, |
— | — | @@ -740,9 +740,9 @@ |
741 | 741 | } |
742 | 742 | } |
743 | 743 | |
744 | | - /** |
| 744 | + /** |
745 | 745 | * Make a link to a special page given its name and, optionally, |
746 | | - * a message key from the link text. |
| 746 | + * a message key from the link text. |
747 | 747 | * Usage example: $skin->specialLink( 'recentchanges' ) |
748 | 748 | */ |
749 | 749 | function specialLink( $name, $key = '' ) { |
— | — | @@ -761,14 +761,14 @@ |
762 | 762 | * @param boolean $escape Do we escape the link text? |
763 | 763 | * @param String $linktype Type of external link. Gets added to the classes |
764 | 764 | * @param array $attribs Array of extra attributes to <a> |
765 | | - * |
766 | | - * @todo FIXME: This is a really crappy implementation. $linktype and |
| 765 | + * |
| 766 | + * @todo FIXME: This is a really crappy implementation. $linktype and |
767 | 767 | * 'external' are mashed into the class attrib for the link (which is made |
768 | | - * into a string). Then, if we've got additional params in $attribs, we |
| 768 | + * into a string). Then, if we've got additional params in $attribs, we |
769 | 769 | * add to it. People using this might want to change the classes (or other |
770 | | - * default link attributes), but passing $attribsText is just messy. Would |
771 | | - * make a lot more sense to make put the classes into $attribs, let the |
772 | | - * hook play with them, *then* expand it all at once. |
| 770 | + * default link attributes), but passing $attribsText is just messy. Would |
| 771 | + * make a lot more sense to make put the classes into $attribs, let the |
| 772 | + * hook play with them, *then* expand it all at once. |
773 | 773 | */ |
774 | 774 | function makeExternalLink( $url, $text, $escape = true, $linktype = '', $attribs = array() ) { |
775 | 775 | if ( isset( $attribs[ 'class' ] ) ) $class = $attribs[ 'class' ]; # yet another hack :( |
— | — | @@ -895,7 +895,7 @@ |
896 | 896 | if( $rev->isDeleted( Revision::DELETED_USER ) && $isPublic ) { |
897 | 897 | $link = wfMsgHtml( 'rev-deleted-user' ); |
898 | 898 | } else if( $rev->userCan( Revision::DELETED_USER ) ) { |
899 | | - $link = $this->userLink( $rev->getUser( Revision::FOR_THIS_USER ), |
| 899 | + $link = $this->userLink( $rev->getUser( Revision::FOR_THIS_USER ), |
900 | 900 | $rev->getUserText( Revision::FOR_THIS_USER ) ); |
901 | 901 | } else { |
902 | 902 | $link = wfMsgHtml( 'rev-deleted-user' ); |
— | — | @@ -917,7 +917,7 @@ |
918 | 918 | $link = wfMsgHtml( 'rev-deleted-user' ); |
919 | 919 | } else if( $rev->userCan( Revision::DELETED_USER ) ) { |
920 | 920 | $userId = $rev->getUser( Revision::FOR_THIS_USER ); |
921 | | - $userText = $rev->getUserText( Revision::FOR_THIS_USER ); |
| 921 | + $userText = $rev->getUserText( Revision::FOR_THIS_USER ); |
922 | 922 | $link = $this->userLink( $userId, $userText ) . |
923 | 923 | ' ' . $this->userToolLinks( $userId, $userText ); |
924 | 924 | } else { |
— | — | @@ -986,11 +986,11 @@ |
987 | 987 | unset( $this->autocommentLocal ); |
988 | 988 | return $comment; |
989 | 989 | } |
990 | | - |
| 990 | + |
991 | 991 | private function formatAutocommentsCallback( $match ) { |
992 | 992 | $title = $this->autocommentTitle; |
993 | 993 | $local = $this->autocommentLocal; |
994 | | - |
| 994 | + |
995 | 995 | $pre=$match[1]; |
996 | 996 | $auto=$match[2]; |
997 | 997 | $post=$match[3]; |
— | — | @@ -1009,7 +1009,7 @@ |
1010 | 1010 | if ( $local ) { |
1011 | 1011 | $sectionTitle = Title::newFromText( '#' . $section ); |
1012 | 1012 | } else { |
1013 | | - $sectionTitle = Title::makeTitleSafe( $title->getNamespace(), |
| 1013 | + $sectionTitle = Title::makeTitleSafe( $title->getNamespace(), |
1014 | 1014 | $title->getDBkey(), $section ); |
1015 | 1015 | } |
1016 | 1016 | if ( $sectionTitle ) { |
— | — | @@ -1091,11 +1091,11 @@ |
1092 | 1092 | if (isset($match[1][0]) && $match[1][0] == ':') |
1093 | 1093 | $match[1] = substr($match[1], 1); |
1094 | 1094 | list( $inside, $trail ) = Linker::splitTrail( $trail ); |
1095 | | - |
| 1095 | + |
1096 | 1096 | $linkText = $text; |
1097 | 1097 | $linkTarget = Linker::normalizeSubpageLink( $this->commentContextTitle, |
1098 | 1098 | $match[1], $linkText ); |
1099 | | - |
| 1099 | + |
1100 | 1100 | $target = Title::newFromText( $linkTarget ); |
1101 | 1101 | if( $target ) { |
1102 | 1102 | if( $target->getText() == '' && !$this->commentLocal && $this->commentContextTitle ) { |
— | — | @@ -1116,7 +1116,7 @@ |
1117 | 1117 | |
1118 | 1118 | return $comment; |
1119 | 1119 | } |
1120 | | - |
| 1120 | + |
1121 | 1121 | static function normalizeSubpageLink( $contextTitle, $target, &$text ) { |
1122 | 1122 | # Valid link forms: |
1123 | 1123 | # Foobar -- normal |
— | — | @@ -1277,14 +1277,14 @@ |
1278 | 1278 | |
1279 | 1279 | /** |
1280 | 1280 | * End a Table Of Contents line. |
1281 | | - * tocUnindent() will be used instead if we're ending a line below |
| 1281 | + * tocUnindent() will be used instead if we're ending a line below |
1282 | 1282 | * the new level. |
1283 | 1283 | */ |
1284 | 1284 | function tocLineEnd() { |
1285 | 1285 | return "</li>\n"; |
1286 | 1286 | } |
1287 | 1287 | |
1288 | | - /** |
| 1288 | + /** |
1289 | 1289 | * Wraps the TOC in a table and provides the hide/collapse javascript. |
1290 | 1290 | * @param string $toc html of the Table Of Contents |
1291 | 1291 | * @return string Full html of the TOC |
— | — | @@ -1306,7 +1306,7 @@ |
1307 | 1307 | . ' } ' ) |
1308 | 1308 | . "\n"; |
1309 | 1309 | } |
1310 | | - |
| 1310 | + |
1311 | 1311 | /** |
1312 | 1312 | * Generate a table of contents from a section tree |
1313 | 1313 | * Currently unused. |
— | — | @@ -1324,7 +1324,7 @@ |
1325 | 1325 | $lastLevel - $section['toclevel'] ); |
1326 | 1326 | else |
1327 | 1327 | $toc .= $this->tocLineEnd(); |
1328 | | - |
| 1328 | + |
1329 | 1329 | $toc .= $this->tocLine( $section['anchor'], |
1330 | 1330 | $section['line'], $section['number'], |
1331 | 1331 | $section['toclevel'], $section['index'] ); |
— | — | @@ -1347,6 +1347,8 @@ |
1348 | 1348 | * @return string HTML to use for edit link |
1349 | 1349 | */ |
1350 | 1350 | public function doEditSectionLink( Title $nt, $section, $tooltip = null ) { |
| 1351 | + // HTML generated here should probably have userlangattributes |
| 1352 | + // added to it for LTR text on RTL pages |
1351 | 1353 | $attribs = array(); |
1352 | 1354 | if( !is_null( $tooltip ) ) { |
1353 | 1355 | $attribs['title'] = wfMsg( 'editsectionhint', $tooltip ); |
— | — | @@ -1644,7 +1646,7 @@ |
1645 | 1647 | wfProfileOut( __METHOD__ ); |
1646 | 1648 | return false; |
1647 | 1649 | } |
1648 | | - |
| 1650 | + |
1649 | 1651 | /** |
1650 | 1652 | * Creates a (show/hide) link for deleting revisions/log entries |
1651 | 1653 | * |
— | — | @@ -1662,7 +1664,7 @@ |
1663 | 1665 | $link = $this->link( $sp, $text, array(), $query, array( 'known', 'noclasses' ) ); |
1664 | 1666 | return Xml::tags( $tag, array( 'class' => 'mw-revdelundel-link' ), "($link)" ); |
1665 | 1667 | } |
1666 | | - |
| 1668 | + |
1667 | 1669 | /** |
1668 | 1670 | * Creates a dead (show/hide) link for deleting revisions/log entries |
1669 | 1671 | * |
— | — | @@ -2000,7 +2002,7 @@ |
2001 | 2003 | /** |
2002 | 2004 | * Returns the attributes for the tooltip and access key |
2003 | 2005 | */ |
2004 | | - public function tooltipAndAccesskeyAttribs( $name ) { |
| 2006 | + public function tooltipAndAccesskeyAttribs( $name ) { |
2005 | 2007 | global $wgEnableTooltipsAndAccesskeys; |
2006 | 2008 | if ( !$wgEnableTooltipsAndAccesskeys ) |
2007 | 2009 | return ''; |
— | — | @@ -2023,10 +2025,10 @@ |
2024 | 2026 | * @deprecated Returns raw bits of HTML, use titleAttrib() and accesskey() |
2025 | 2027 | */ |
2026 | 2028 | public function tooltipAndAccesskey( $name ) { |
2027 | | - return Xml::expandAttributes( $this->tooltipAndAccesskeyAttribs( $name ) ); |
| 2029 | + return Xml::expandAttributes( $this->tooltipAndAccesskeyAttribs( $name ) ); |
2028 | 2030 | } |
2029 | | - |
2030 | 2031 | |
| 2032 | + |
2031 | 2033 | /** @deprecated Returns raw bits of HTML, use titleAttrib() */ |
2032 | 2034 | public function tooltip( $name, $options = null ) { |
2033 | 2035 | global $wgEnableTooltipsAndAccesskeys; |
Index: trunk/phase3/includes/Title.php |
— | — | @@ -2693,12 +2693,12 @@ |
2694 | 2694 | if( !File::checkExtensionCompatibility( $file, $nt->getDBkey() ) ) { |
2695 | 2695 | $errors[] = array('imagetypemismatch'); |
2696 | 2696 | } |
2697 | | - } |
| 2697 | + } |
2698 | 2698 | $destfile = wfLocalFile( $nt ); |
2699 | 2699 | if( !$wgUser->isAllowed( 'reupload-shared' ) && !$destfile->exists() && wfFindFile( $nt ) ) { |
2700 | 2700 | $errors[] = array( 'file-exists-sharedrepo' ); |
2701 | 2701 | } |
2702 | | - |
| 2702 | + |
2703 | 2703 | } |
2704 | 2704 | |
2705 | 2705 | if ( $auth ) { |
— | — | @@ -3658,6 +3658,13 @@ |
3659 | 3659 | } |
3660 | 3660 | |
3661 | 3661 | /** |
| 3662 | + * Returns true if this is a special page. |
| 3663 | + */ |
| 3664 | + public function isSpecialPage( ) { |
| 3665 | + return $this->getNamespace() == NS_SPECIAL; |
| 3666 | + } |
| 3667 | + |
| 3668 | + /** |
3662 | 3669 | * Returns true if this title resolves to the named special page |
3663 | 3670 | * @param $name \type{\string} The special page name |
3664 | 3671 | */ |
Index: trunk/phase3/includes/SkinTemplate.php |
— | — | @@ -304,7 +304,10 @@ |
305 | 305 | $tpl->setRef( 'userpage', $this->userpage ); |
306 | 306 | $tpl->setRef( 'userpageurl', $this->userpageUrlDetails['href'] ); |
307 | 307 | $tpl->set( 'userlang', $wgLang->getCode() ); |
308 | | - $tpl->set( 'userlangattributes', 'lang="' . $wgLang->getCode() . '" xml:lang="' . $wgLang->getCode() . '"' ); |
| 308 | + $tpl->set( 'userlangattributes', 'lang="' . $wgLang->getCode() . '" xml:lang="' . $wgLang->getCode() . '" dir="' . $wgLang->getDir() . '"'); |
| 309 | + if($this->mTitle->isSpecialPage()) { |
| 310 | + $tpl->set( 'specialpageattributes', 'lang="' . $wgLang->getCode() . '" xml:lang="' . $wgLang->getCode() . '" dir="' . $wgLang->getDir() . '"'); |
| 311 | + } |
309 | 312 | |
310 | 313 | $newtalks = $wgUser->getNewMessageLinks(); |
311 | 314 | |
Index: trunk/phase3/includes/SpecialPage.php |
— | — | @@ -89,30 +89,30 @@ |
90 | 90 | 'Fewestrevisions' => array( 'SpecialPage', 'Fewestrevisions' ), |
91 | 91 | 'Withoutinterwiki' => array( 'SpecialPage', 'Withoutinterwiki' ), |
92 | 92 | 'Protectedpages' => array( 'SpecialPage', 'Protectedpages' ), |
93 | | - 'Protectedtitles' => array( 'SpecialPage', 'Protectedtitles' ), |
94 | | - 'Shortpages' => array( 'SpecialPage', 'Shortpages' ), |
95 | | - 'Uncategorizedcategories' => array( 'SpecialPage', 'Uncategorizedcategories' ), |
96 | | - 'Uncategorizedimages' => array( 'SpecialPage', 'Uncategorizedimages' ), |
97 | | - 'Uncategorizedpages' => array( 'SpecialPage', 'Uncategorizedpages' ), |
| 93 | + 'Protectedtitles' => array( 'SpecialPage', 'Protectedtitles' ), |
| 94 | + 'Shortpages' => array( 'SpecialPage', 'Shortpages' ), |
| 95 | + 'Uncategorizedcategories' => array( 'SpecialPage', 'Uncategorizedcategories' ), |
| 96 | + 'Uncategorizedimages' => array( 'SpecialPage', 'Uncategorizedimages' ), |
| 97 | + 'Uncategorizedpages' => array( 'SpecialPage', 'Uncategorizedpages' ), |
98 | 98 | 'Uncategorizedtemplates' => array( 'SpecialPage', 'Uncategorizedtemplates' ), |
99 | 99 | 'Unusedcategories' => array( 'SpecialPage', 'Unusedcategories' ), |
100 | | - 'Unusedimages' => array( 'SpecialPage', 'Unusedimages' ), |
| 100 | + 'Unusedimages' => array( 'SpecialPage', 'Unusedimages' ), |
101 | 101 | 'Unusedtemplates' => array( 'SpecialPage', 'Unusedtemplates' ), |
102 | | - 'Unwatchedpages' => array( 'SpecialPage', 'Unwatchedpages', 'unwatchedpages' ), |
| 102 | + 'Unwatchedpages' => array( 'SpecialPage', 'Unwatchedpages', 'unwatchedpages' ), |
103 | 103 | 'Wantedcategories' => array( 'SpecialPage', 'Wantedcategories' ), |
104 | 104 | 'Wantedfiles' => array( 'SpecialPage', 'Wantedfiles' ), |
105 | 105 | 'Wantedpages' => array( 'IncludableSpecialPage', 'Wantedpages' ), |
106 | 106 | 'Wantedtemplates' => array( 'SpecialPage', 'Wantedtemplates' ), |
107 | 107 | |
108 | 108 | # List of pages |
109 | | - 'Allpages' => 'SpecialAllpages', |
110 | | - 'Prefixindex' => 'SpecialPrefixindex', |
| 109 | + 'Allpages' => 'SpecialAllpages', |
| 110 | + 'Prefixindex' => 'SpecialPrefixindex', |
111 | 111 | 'Categories' => array( 'SpecialPage', 'Categories' ), |
112 | 112 | 'Disambiguations' => array( 'SpecialPage', 'Disambiguations' ), |
113 | | - 'Listredirects' => array( 'SpecialPage', 'Listredirects' ), |
| 113 | + 'Listredirects' => array( 'SpecialPage', 'Listredirects' ), |
114 | 114 | |
115 | 115 | # Login/create account |
116 | | - 'Userlogin' => array( 'SpecialPage', 'Userlogin' ), |
| 116 | + 'Userlogin' => array( 'SpecialPage', 'Userlogin' ), |
117 | 117 | 'CreateAccount' => array( 'SpecialRedirectToSpecial', 'CreateAccount', 'Userlogin', 'signup', array( 'uselang' ) ), |
118 | 118 | |
119 | 119 | # Users and rights |
— | — | @@ -120,15 +120,15 @@ |
121 | 121 | 'Ipblocklist' => array( 'SpecialPage', 'Ipblocklist' ), |
122 | 122 | 'Resetpass' => 'SpecialResetpass', |
123 | 123 | 'DeletedContributions' => 'DeletedContributionsPage', |
124 | | - 'Preferences' => 'SpecialPreferences', |
125 | | - 'Contributions' => 'SpecialContributions', |
| 124 | + 'Preferences' => 'SpecialPreferences', |
| 125 | + 'Contributions' => 'SpecialContributions', |
126 | 126 | 'Listgrouprights' => 'SpecialListGroupRights', |
127 | 127 | 'Listusers' => array( 'SpecialPage', 'Listusers' ), |
128 | 128 | 'Activeusers' => 'SpecialActiveUsers', |
129 | 129 | 'Userrights' => 'UserrightsPage', |
130 | 130 | |
131 | 131 | # Recent changes and logs |
132 | | - 'Newimages' => array( 'IncludableSpecialPage', 'Newimages' ), |
| 132 | + 'Newimages' => array( 'IncludableSpecialPage', 'Newimages' ), |
133 | 133 | 'Log' => array( 'SpecialPage', 'Log' ), |
134 | 134 | 'Watchlist' => array( 'SpecialPage', 'Watchlist' ), |
135 | 135 | 'Newpages' => 'SpecialNewpages', |
— | — | @@ -168,14 +168,14 @@ |
169 | 169 | 'Import' => 'SpecialImport', |
170 | 170 | 'Undelete' => array( 'SpecialPage', 'Undelete', 'deletedhistory' ), |
171 | 171 | 'Whatlinkshere' => 'SpecialWhatlinkshere', |
172 | | - 'MergeHistory' => array( 'SpecialPage', 'MergeHistory', 'mergehistory' ), |
173 | | - |
| 172 | + 'MergeHistory' => array( 'SpecialPage', 'MergeHistory', 'mergehistory' ), |
| 173 | + |
174 | 174 | # Other |
175 | 175 | 'Booksources' => 'SpecialBookSources', |
176 | | - |
| 176 | + |
177 | 177 | # Unlisted / redirects |
178 | 178 | 'Blankpage' => 'SpecialBlankpage', |
179 | | - 'Blockme' => array( 'UnlistedSpecialPage', 'Blockme' ), |
| 179 | + 'Blockme' => array( 'UnlistedSpecialPage', 'Blockme' ), |
180 | 180 | 'Emailuser' => array( 'UnlistedSpecialPage', 'Emailuser' ), |
181 | 181 | 'Listadmins' => array( 'SpecialRedirectToSpecial', 'Listadmins', 'Listusers', 'sysop' ), |
182 | 182 | 'Listbots' => array( 'SpecialRedirectToSpecial', 'Listbots', 'Listusers', 'bot' ), |
— | — | @@ -798,7 +798,7 @@ |
799 | 799 | * Outputs a summary message on top of special pages |
800 | 800 | * Per default the message key is the canonical name of the special page |
801 | 801 | * May be overriden, i.e. by extensions to stick with the naming conventions |
802 | | - * for message keys: 'extensionname-xxx' |
| 802 | + * for message keys: 'extensionname-xxx' |
803 | 803 | * |
804 | 804 | * @param string message key of the summary |
805 | 805 | */ |