r60786 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60785‎ | r60786 | r60787 >
Date:09:32, 7 January 2010
Author:mah
Status:ok (Comments)
Tags:
Comment:
Make LTR wgLang do the right thing on RTL wgContLang wikis. See bug 6100 and dupes like bug 4047, bug 19228, bug 9137, etc.
Modified paths:
  • /trunk/phase3/includes/Linker.php (modified) (history)
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)
  • /trunk/phase3/includes/SpecialPage.php (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)
  • /trunk/phase3/skins/Modern.php (modified) (history)
  • /trunk/phase3/skins/MonoBook.php (modified) (history)
  • /trunk/phase3/skins/Vector.php (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/Vector.php
@@ -463,9 +463,9 @@
464464 <div id="page-base" class="noprint"></div>
465465 <div id="head-base" class="noprint"></div>
466466 <!-- content -->
467 - <div id="content">
 467+ <div id="content" <?php $this->html('specialpageattributes') ?>>
468468 <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>
470470 <?php if ( $this->data['sitenotice'] ): ?>
471471 <!-- sitenotice -->
472472 <div id="siteNotice"><?php $this->html( 'sitenotice' ) ?></div>
@@ -480,7 +480,7 @@
481481 <h3 id="siteSub"><?php $this->msg( 'tagline' ) ?></h3>
482482 <!-- /tagline -->
483483 <!-- subtitle -->
484 - <div id="contentSub"><?php $this->html( 'subtitle' ) ?></div>
 484+ <div id="contentSub" <?php $this->html('userlangattributes') ?>><?php $this->html( 'subtitle' ) ?></div>
485485 <!-- /subtitle -->
486486 <?php if ( $this->data['undelete'] ): ?>
487487 <!-- undelete -->
@@ -538,7 +538,7 @@
539539 </div>
540540 <!-- /panel -->
541541 <!-- footer -->
542 - <div id="footer">
 542+ <div id="footer" <?php $this->html('userlangattributes') ?>>
543543 <?php foreach( $validFooterLinks as $category => $links ): ?>
544544 <?php if ( count( $links ) > 0 ): ?>
545545 <ul id="footer-<?php echo $category ?>">
Index: trunk/phase3/skins/MonoBook.php
@@ -81,13 +81,13 @@
8282 class="mediawiki <?php $this->text('dir'); $this->text('capitalizeallnouns') ?> <?php $this->text('pageclass') ?> <?php $this->text('skinnameclass') ?>">
8383 <div id="globalWrapper">
8484 <div id="column-content">
85 - <div id="content">
 85+ <div id="content" <?php $this->html("specialpageattributes") ?>>
8686 <a id="top"></a>
8787 <?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
8888 <h1 id="firstHeading" class="firstHeading"><?php $this->html('title') ?></h1>
8989 <div id="bodyContent">
9090 <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>
9292 <?php if($this->data['undelete']) { ?><div id="contentSub2"><?php $this->html('undelete') ?></div><?php } ?>
9393 <?php if($this->data['newtalk'] ) { ?><div class="usermessage"><?php $this->html('newtalk') ?></div><?php } ?>
9494 <?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 @@
101101 </div>
102102 </div>
103103 </div>
104 - <div id="column-one">
 104+ <div id="column-one" <?php $this->html('userlangattributes') ?>>
105105 <div id="p-cactions" class="portlet">
106106 <h5><?php $this->msg('views') ?></h5>
107107 <div class="pBody">
108 - <ul <?php $this->html('userlangattributes') ?>>
 108+ <ul>
109109 <?php foreach($this->data['content_actions'] as $key => $tab) {
110110 echo '
111111 <li id="' . Sanitizer::escapeId( "ca-$key" ) . '"';
@@ -169,7 +169,7 @@
170170 ?>
171171 </div><!-- end of the left (by default at least) column -->
172172 <div class="visualClear"></div>
173 - <div id="footer">
 173+ <div id="footer" <?php $this->html('userlangattributes') ?>>
174174 <?php
175175 if($this->data['poweredbyico']) { ?>
176176 <div id="f-poweredbyico"><?php $this->html('poweredbyico') ?></div>
@@ -221,7 +221,7 @@
222222 global $wgUseTwoButtonsSearchForm;
223223 ?>
224224 <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>
226226 <div id="searchBody" class="pBody">
227227 <form action="<?php $this->text('wgScript') ?>" id="searchform">
228228 <input type='hidden' name="title" value="<?php $this->text('searchtitle') ?>"/>
@@ -249,7 +249,7 @@
250250 function toolbox() {
251251 ?>
252252 <div class="portlet" id="p-tb">
253 - <h5 <?php $this->html('userlangattributes')?>><?php $this->msg('toolbox') ?></h5>
 253+ <h5><?php $this->msg('toolbox') ?></h5>
254254 <div class="pBody">
255255 <ul>
256256 <?php
@@ -328,7 +328,7 @@
329329 function customBox( $bar, $cont ) {
330330 ?>
331331 <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>
333333 <div class='pBody'>
334334 <?php if ( is_array( $cont ) ) { ?>
335335 <ul>
Index: trunk/phase3/skins/Modern.php
@@ -20,7 +20,7 @@
2121 $template = 'ModernTemplate', $useHeadElement = true;
2222
2323 /*
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
2525 * skin L&F.
2626 */
2727 function getPoweredBy() {
@@ -113,9 +113,9 @@
114114 <!-- contentholder does nothing by default, but it allows users to style the text inside
115115 the content area without affecting the meaning of 'em' in #mw_content, which is used
116116 for the margins -->
117 - <div id="mw_contentholder">
 117+ <div id="mw_contentholder" <?php $this->html("specialpageattributes") ?>>
118118 <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>
120120 <div class="mw-topbox" id="siteSub"><?php $this->msg('tagline') ?></div>
121121 <?php if($this->data['newtalk'] ) {
122122 ?><div class="usermessage mw-topbox"><?php $this->html('newtalk') ?></div>
@@ -125,7 +125,7 @@
126126 <?php } ?>
127127 </div>
128128
129 - <div id="contentSub"><?php $this->html('subtitle') ?></div>
 129+ <div id="contentSub" <?php $this->html('userlangattributes') ?>><?php $this->html('subtitle') ?></div>
130130
131131 <?php if($this->data['undelete']) { ?><div id="contentSub2"><?php $this->html('undelete') ?></div><?php } ?>
132132 <?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 @@
139139 </div><!-- mw_content -->
140140 </div><!-- mw_contentwrapper -->
141141
142 - <div id="mw_portlets">
 142+ <div id="mw_portlets" <?php $this->html("userlangattributes") ?>>
143143
144144 <!-- portlets -->
145 - <?php
146 - $sidebar = $this->data['sidebar'];
 145+ <?php
 146+ $sidebar = $this->data['sidebar'];
147147 if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true;
148148 if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true;
149149 if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true;
@@ -185,8 +185,8 @@
186186 </div>
187187
188188
189 - <!-- footer -->
190 - <div id="footer">
 189+ <!-- footer -->
 190+ <div id="footer" <?php $this->html('userlangattributes') ?>>
191191 <ul id="f-list">
192192 <?php
193193 $footerlinks = array(
@@ -335,7 +335,7 @@
336336 <?php } else {
337337 # allow raw HTML block to be defined by extensions
338338 print $cont;
339 - }
 339+ }
340340 ?>
341341 </div>
342342 </div>
Index: trunk/phase3/includes/Linker.php
@@ -110,7 +110,7 @@
111111 if ( $t->isRedirect() ) {
112112 # Page is a redirect
113113 $colour = 'mw-redirect';
114 - } elseif ( $threshold > 0 &&
 114+ } elseif ( $threshold > 0 &&
115115 $t->exists() && $t->getLength() < $threshold &&
116116 MWNamespace::isContent( $t->getNamespace() ) ) {
117117 # Page is a stub
@@ -369,7 +369,7 @@
370370 }
371371 }
372372
373 - /**
 373+ /**
374374 * Returns the filename part of an url.
375375 * Used as alternative text for external images.
376376 */
@@ -383,7 +383,7 @@
384384 return $basename;
385385 }
386386
387 - /**
 387+ /**
388388 * Return the code for images which were added via external links,
389389 * via Parser::maybeMakeExternalImage().
390390 */
@@ -621,7 +621,7 @@
622622 # So we don't need to pass it here in $query. However, the URL for the
623623 # zoom icon still needs it, so we make a unique query for it. See bug 14771
624624 $url = $title->getLocalURL( $query );
625 - if( $page ) {
 625+ if( $page ) {
626626 $url = wfAppendQuery( $url, 'page=' . urlencode( $page ) );
627627 }
628628
@@ -692,7 +692,7 @@
693693 }
694694
695695 list( $inside, $trail ) = self::splitTrail( $trail );
696 -
 696+
697697 wfProfileOut( __METHOD__ );
698698 return Html::element( 'a', array(
699699 'href' => $href,
@@ -740,9 +740,9 @@
741741 }
742742 }
743743
744 - /**
 744+ /**
745745 * 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.
747747 * Usage example: $skin->specialLink( 'recentchanges' )
748748 */
749749 function specialLink( $name, $key = '' ) {
@@ -761,14 +761,14 @@
762762 * @param boolean $escape Do we escape the link text?
763763 * @param String $linktype Type of external link. Gets added to the classes
764764 * @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
767767 * '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
769769 * 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.
773773 */
774774 function makeExternalLink( $url, $text, $escape = true, $linktype = '', $attribs = array() ) {
775775 if ( isset( $attribs[ 'class' ] ) ) $class = $attribs[ 'class' ]; # yet another hack :(
@@ -895,7 +895,7 @@
896896 if( $rev->isDeleted( Revision::DELETED_USER ) && $isPublic ) {
897897 $link = wfMsgHtml( 'rev-deleted-user' );
898898 } 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 ),
900900 $rev->getUserText( Revision::FOR_THIS_USER ) );
901901 } else {
902902 $link = wfMsgHtml( 'rev-deleted-user' );
@@ -917,7 +917,7 @@
918918 $link = wfMsgHtml( 'rev-deleted-user' );
919919 } else if( $rev->userCan( Revision::DELETED_USER ) ) {
920920 $userId = $rev->getUser( Revision::FOR_THIS_USER );
921 - $userText = $rev->getUserText( Revision::FOR_THIS_USER );
 921+ $userText = $rev->getUserText( Revision::FOR_THIS_USER );
922922 $link = $this->userLink( $userId, $userText ) .
923923 ' ' . $this->userToolLinks( $userId, $userText );
924924 } else {
@@ -986,11 +986,11 @@
987987 unset( $this->autocommentLocal );
988988 return $comment;
989989 }
990 -
 990+
991991 private function formatAutocommentsCallback( $match ) {
992992 $title = $this->autocommentTitle;
993993 $local = $this->autocommentLocal;
994 -
 994+
995995 $pre=$match[1];
996996 $auto=$match[2];
997997 $post=$match[3];
@@ -1009,7 +1009,7 @@
10101010 if ( $local ) {
10111011 $sectionTitle = Title::newFromText( '#' . $section );
10121012 } else {
1013 - $sectionTitle = Title::makeTitleSafe( $title->getNamespace(),
 1013+ $sectionTitle = Title::makeTitleSafe( $title->getNamespace(),
10141014 $title->getDBkey(), $section );
10151015 }
10161016 if ( $sectionTitle ) {
@@ -1091,11 +1091,11 @@
10921092 if (isset($match[1][0]) && $match[1][0] == ':')
10931093 $match[1] = substr($match[1], 1);
10941094 list( $inside, $trail ) = Linker::splitTrail( $trail );
1095 -
 1095+
10961096 $linkText = $text;
10971097 $linkTarget = Linker::normalizeSubpageLink( $this->commentContextTitle,
10981098 $match[1], $linkText );
1099 -
 1099+
11001100 $target = Title::newFromText( $linkTarget );
11011101 if( $target ) {
11021102 if( $target->getText() == '' && !$this->commentLocal && $this->commentContextTitle ) {
@@ -1116,7 +1116,7 @@
11171117
11181118 return $comment;
11191119 }
1120 -
 1120+
11211121 static function normalizeSubpageLink( $contextTitle, $target, &$text ) {
11221122 # Valid link forms:
11231123 # Foobar -- normal
@@ -1277,14 +1277,14 @@
12781278
12791279 /**
12801280 * 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
12821282 * the new level.
12831283 */
12841284 function tocLineEnd() {
12851285 return "</li>\n";
12861286 }
12871287
1288 - /**
 1288+ /**
12891289 * Wraps the TOC in a table and provides the hide/collapse javascript.
12901290 * @param string $toc html of the Table Of Contents
12911291 * @return string Full html of the TOC
@@ -1306,7 +1306,7 @@
13071307 . ' } ' )
13081308 . "\n";
13091309 }
1310 -
 1310+
13111311 /**
13121312 * Generate a table of contents from a section tree
13131313 * Currently unused.
@@ -1324,7 +1324,7 @@
13251325 $lastLevel - $section['toclevel'] );
13261326 else
13271327 $toc .= $this->tocLineEnd();
1328 -
 1328+
13291329 $toc .= $this->tocLine( $section['anchor'],
13301330 $section['line'], $section['number'],
13311331 $section['toclevel'], $section['index'] );
@@ -1347,6 +1347,8 @@
13481348 * @return string HTML to use for edit link
13491349 */
13501350 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
13511353 $attribs = array();
13521354 if( !is_null( $tooltip ) ) {
13531355 $attribs['title'] = wfMsg( 'editsectionhint', $tooltip );
@@ -1644,7 +1646,7 @@
16451647 wfProfileOut( __METHOD__ );
16461648 return false;
16471649 }
1648 -
 1650+
16491651 /**
16501652 * Creates a (show/hide) link for deleting revisions/log entries
16511653 *
@@ -1662,7 +1664,7 @@
16631665 $link = $this->link( $sp, $text, array(), $query, array( 'known', 'noclasses' ) );
16641666 return Xml::tags( $tag, array( 'class' => 'mw-revdelundel-link' ), "($link)" );
16651667 }
1666 -
 1668+
16671669 /**
16681670 * Creates a dead (show/hide) link for deleting revisions/log entries
16691671 *
@@ -2000,7 +2002,7 @@
20012003 /**
20022004 * Returns the attributes for the tooltip and access key
20032005 */
2004 - public function tooltipAndAccesskeyAttribs( $name ) {
 2006+ public function tooltipAndAccesskeyAttribs( $name ) {
20052007 global $wgEnableTooltipsAndAccesskeys;
20062008 if ( !$wgEnableTooltipsAndAccesskeys )
20072009 return '';
@@ -2023,10 +2025,10 @@
20242026 * @deprecated Returns raw bits of HTML, use titleAttrib() and accesskey()
20252027 */
20262028 public function tooltipAndAccesskey( $name ) {
2027 - return Xml::expandAttributes( $this->tooltipAndAccesskeyAttribs( $name ) );
 2029+ return Xml::expandAttributes( $this->tooltipAndAccesskeyAttribs( $name ) );
20282030 }
2029 -
20302031
 2032+
20312033 /** @deprecated Returns raw bits of HTML, use titleAttrib() */
20322034 public function tooltip( $name, $options = null ) {
20332035 global $wgEnableTooltipsAndAccesskeys;
Index: trunk/phase3/includes/Title.php
@@ -2693,12 +2693,12 @@
26942694 if( !File::checkExtensionCompatibility( $file, $nt->getDBkey() ) ) {
26952695 $errors[] = array('imagetypemismatch');
26962696 }
2697 - }
 2697+ }
26982698 $destfile = wfLocalFile( $nt );
26992699 if( !$wgUser->isAllowed( 'reupload-shared' ) && !$destfile->exists() && wfFindFile( $nt ) ) {
27002700 $errors[] = array( 'file-exists-sharedrepo' );
27012701 }
2702 -
 2702+
27032703 }
27042704
27052705 if ( $auth ) {
@@ -3658,6 +3658,13 @@
36593659 }
36603660
36613661 /**
 3662+ * Returns true if this is a special page.
 3663+ */
 3664+ public function isSpecialPage( ) {
 3665+ return $this->getNamespace() == NS_SPECIAL;
 3666+ }
 3667+
 3668+ /**
36623669 * Returns true if this title resolves to the named special page
36633670 * @param $name \type{\string} The special page name
36643671 */
Index: trunk/phase3/includes/SkinTemplate.php
@@ -304,7 +304,10 @@
305305 $tpl->setRef( 'userpage', $this->userpage );
306306 $tpl->setRef( 'userpageurl', $this->userpageUrlDetails['href'] );
307307 $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+ }
309312
310313 $newtalks = $wgUser->getNewMessageLinks();
311314
Index: trunk/phase3/includes/SpecialPage.php
@@ -89,30 +89,30 @@
9090 'Fewestrevisions' => array( 'SpecialPage', 'Fewestrevisions' ),
9191 'Withoutinterwiki' => array( 'SpecialPage', 'Withoutinterwiki' ),
9292 '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' ),
9898 'Uncategorizedtemplates' => array( 'SpecialPage', 'Uncategorizedtemplates' ),
9999 'Unusedcategories' => array( 'SpecialPage', 'Unusedcategories' ),
100 - 'Unusedimages' => array( 'SpecialPage', 'Unusedimages' ),
 100+ 'Unusedimages' => array( 'SpecialPage', 'Unusedimages' ),
101101 'Unusedtemplates' => array( 'SpecialPage', 'Unusedtemplates' ),
102 - 'Unwatchedpages' => array( 'SpecialPage', 'Unwatchedpages', 'unwatchedpages' ),
 102+ 'Unwatchedpages' => array( 'SpecialPage', 'Unwatchedpages', 'unwatchedpages' ),
103103 'Wantedcategories' => array( 'SpecialPage', 'Wantedcategories' ),
104104 'Wantedfiles' => array( 'SpecialPage', 'Wantedfiles' ),
105105 'Wantedpages' => array( 'IncludableSpecialPage', 'Wantedpages' ),
106106 'Wantedtemplates' => array( 'SpecialPage', 'Wantedtemplates' ),
107107
108108 # List of pages
109 - 'Allpages' => 'SpecialAllpages',
110 - 'Prefixindex' => 'SpecialPrefixindex',
 109+ 'Allpages' => 'SpecialAllpages',
 110+ 'Prefixindex' => 'SpecialPrefixindex',
111111 'Categories' => array( 'SpecialPage', 'Categories' ),
112112 'Disambiguations' => array( 'SpecialPage', 'Disambiguations' ),
113 - 'Listredirects' => array( 'SpecialPage', 'Listredirects' ),
 113+ 'Listredirects' => array( 'SpecialPage', 'Listredirects' ),
114114
115115 # Login/create account
116 - 'Userlogin' => array( 'SpecialPage', 'Userlogin' ),
 116+ 'Userlogin' => array( 'SpecialPage', 'Userlogin' ),
117117 'CreateAccount' => array( 'SpecialRedirectToSpecial', 'CreateAccount', 'Userlogin', 'signup', array( 'uselang' ) ),
118118
119119 # Users and rights
@@ -120,15 +120,15 @@
121121 'Ipblocklist' => array( 'SpecialPage', 'Ipblocklist' ),
122122 'Resetpass' => 'SpecialResetpass',
123123 'DeletedContributions' => 'DeletedContributionsPage',
124 - 'Preferences' => 'SpecialPreferences',
125 - 'Contributions' => 'SpecialContributions',
 124+ 'Preferences' => 'SpecialPreferences',
 125+ 'Contributions' => 'SpecialContributions',
126126 'Listgrouprights' => 'SpecialListGroupRights',
127127 'Listusers' => array( 'SpecialPage', 'Listusers' ),
128128 'Activeusers' => 'SpecialActiveUsers',
129129 'Userrights' => 'UserrightsPage',
130130
131131 # Recent changes and logs
132 - 'Newimages' => array( 'IncludableSpecialPage', 'Newimages' ),
 132+ 'Newimages' => array( 'IncludableSpecialPage', 'Newimages' ),
133133 'Log' => array( 'SpecialPage', 'Log' ),
134134 'Watchlist' => array( 'SpecialPage', 'Watchlist' ),
135135 'Newpages' => 'SpecialNewpages',
@@ -168,14 +168,14 @@
169169 'Import' => 'SpecialImport',
170170 'Undelete' => array( 'SpecialPage', 'Undelete', 'deletedhistory' ),
171171 'Whatlinkshere' => 'SpecialWhatlinkshere',
172 - 'MergeHistory' => array( 'SpecialPage', 'MergeHistory', 'mergehistory' ),
173 -
 172+ 'MergeHistory' => array( 'SpecialPage', 'MergeHistory', 'mergehistory' ),
 173+
174174 # Other
175175 'Booksources' => 'SpecialBookSources',
176 -
 176+
177177 # Unlisted / redirects
178178 'Blankpage' => 'SpecialBlankpage',
179 - 'Blockme' => array( 'UnlistedSpecialPage', 'Blockme' ),
 179+ 'Blockme' => array( 'UnlistedSpecialPage', 'Blockme' ),
180180 'Emailuser' => array( 'UnlistedSpecialPage', 'Emailuser' ),
181181 'Listadmins' => array( 'SpecialRedirectToSpecial', 'Listadmins', 'Listusers', 'sysop' ),
182182 'Listbots' => array( 'SpecialRedirectToSpecial', 'Listbots', 'Listusers', 'bot' ),
@@ -798,7 +798,7 @@
799799 * Outputs a summary message on top of special pages
800800 * Per default the message key is the canonical name of the special page
801801 * 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'
803803 *
804804 * @param string message key of the summary
805805 */

Follow-up revisions

RevisionCommit summaryAuthorDate
r60799In r60786 mah added 'specialpageattributes' to the skin, only in the case of ...tparscal18:59, 7 January 2010
r60829Follow up r60798 & r60785...mah03:34, 8 January 2010
r90264(part of bug 6100) Set the directionality based on user language instead of c...robin11:32, 17 June 2011
r90320Follow-up to r90265: directionality improvements as part of bug 6100 (under $...robin21:48, 17 June 2011
r90334Follow-up to r90265: directionality improvements as part of bug 6100 (under $...robin13:12, 18 June 2011
r90517* Improvements as part of bug 6100: Use wfUILang() instead of $wgContLang whe...robin10:14, 21 June 2011
r90581Directionality improvements as part of bug 6100 (under $wgBetterDirectionalit...robin13:10, 22 June 2011
r90734(bug 12406) Pages with names in RTL scripts are not listed correctly in Speci...robin20:25, 24 June 2011
r90742Directionality and language improvements as part of bug 6100 (under $wgBetter...robin22:10, 24 June 2011
r90743Directionality improvements as part of bug 6100 (under $wgBetterDirectionality):...robin23:01, 24 June 2011
r91315* Add release notes for my recent commits (bug 6100 and others like bugs 2803...robin22:50, 1 July 2011
r91518(bug 6100; follow-up to r91315) Being bold and removing $wgBetterDirectionali...robin02:26, 6 July 2011

Comments

#Comment by Raymond (talk | contribs)   17:44, 7 January 2010

Seen at translatewiki:

PHP Notice: Undefined index: specialpageattributes in /var/www/w/includes/SkinTemplate.php on line 1137

#Comment by Raymond (talk | contribs)   19:24, 7 January 2010

Fixed with r60799

#Comment by Tim Starling (talk | contribs)   00:13, 8 January 2010

Mark, can you explain what this change actually does? Since it seems to do quite a lot less than the other proposed patches on that bug report, so I assume it doesn't fix it.

#Comment by MarkAHershberger (talk | contribs)   03:53, 8 January 2010

I don't claim that this solves everything, but this does solve a lot of the interface problems where $wgContLang != $wgLang. It builds on those other patches (many of which have been applied) and takes it a few steps further.

#Comment by Nikerabbit (talk | contribs)   09:39, 19 March 2011
+		if($this->mTitle->isSpecialPage()) {
+			$tpl->set( 'specialpageattributes', 'lang="' . $wgLang->getCode() . '" xml:lang="' . $wgLang->getCode() . '" dir="' . $wgLang->getDir() . '"');
+		}

I think it should be possible to control these attributes from the special page.

#Comment by Nikerabbit (talk | contribs)   09:59, 19 March 2011

Also, the user lang attributes set for div#content is overriden in skins/vector/screen.css:38.

#Comment by Krinkle (talk | contribs)   17:57, 20 March 2011

Follow-up r60829: Re-introduces specialpageattributes for #content

Status & tagging log