r14134 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r14133‎ | r14134 | r14135 >
Date:16:41, 8 May 2006
Author:nikerabbit
Status:old
Tags:
Comment:
* More BIDI-fixes to special pages
Modified paths:
  • /trunk/phase3/includes/SpecialImagelist.php (modified) (history)
  • /trunk/phase3/includes/SpecialNewpages.php (modified) (history)
  • /trunk/phase3/includes/SpecialShortpages.php (modified) (history)
  • /trunk/phase3/includes/SpecialUnusedimages.php (modified) (history)
  • /trunk/phase3/includes/SpecialUnusedtemplates.php (modified) (history)
  • /trunk/phase3/includes/SpecialUnwatchedpages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialNewpages.php
@@ -75,6 +75,7 @@
7676 global $wgLang, $wgContLang, $wgUser, $wgUseRCPatrol;
7777 $u = $result->user;
7878 $ut = $result->user_text;
 79+ $dirmark = $wgContLang->getDirMark(); // To keep text in correct order
7980
8081 $length = wfMsgExt( 'nbytes', array('parsemag', 'escape'),
8182 $wgLang->formatNum( $result->length ) );
@@ -89,10 +90,12 @@
9091 $link = $skin->makeKnownLink( $ns . ':' . $result->title, '' );
9192 }
9293
93 - $userTools = $skin->userLink( $u, $ut ) . $skin->userToolLinks( $u, $ut );
 94+ $userLink = $skin->userLink( $u, $ut );
 95+ $userTools = $skin->userToolLinks( $u, $ut );
9496
95 - $s = "{$d} {$link} ({$length}) . . {$userTools}";
96 - $s .= $skin->commentBlock( $result->comment );
 97+ $s = "{$d} {$dirmark}{$link} {$dirmark}({$length}) . . " .
 98+ "{$dirmark}{$userLink}{$dirmark}{$userTools}";
 99+ $s .= $dirmark . $skin->commentBlock( $result->comment );
97100 return $s;
98101 }
99102
Index: trunk/phase3/includes/SpecialImagelist.php
@@ -9,7 +9,7 @@
1010 *
1111 */
1212 function wfSpecialImagelist() {
13 - global $wgUser, $wgOut, $wgLang, $wgRequest, $wgMiserMode;
 13+ global $wgUser, $wgOut, $wgLang, $wgContLang, $wgRequest, $wgMiserMode;
1414
1515 $sort = $wgRequest->getVal( 'sort' );
1616 $wpIlMatch = $wgRequest->getText( 'wpIlMatch' );
@@ -95,6 +95,8 @@
9696 $ul = $sk->makeLinkObj( Title::makeTitle( NS_USER, $ut ), $ut );
9797 }
9898
 99+ $dirmark = $wgContLang->getDirMark(); // to keep text in correct direction
 100+
99101 $ilink = "<a href=\"" . htmlspecialchars( Image::imageUrl( $name ) ) .
100102 "\">" . strtr(htmlspecialchars( $name ), '_', ' ') . "</a>";
101103
@@ -107,7 +109,8 @@
108110 $date = $wgLang->timeanddate( $s->img_timestamp, true );
109111 $comment = $sk->commentBlock( $s->img_description );
110112
111 - $l = "({$desc}) {$ilink} . . {$nb} . . {$ul} . . {$date} {$comment}<br />\n";
 113+ $l = "({$desc}) {$dirmark}{$ilink} . . {$dirmark}{$nb} . . {$dirmark}{$ul}".
 114+ " . . {$dirmark}{$date} . . {$dirmark}{$comment}<br />\n";
112115 $wgOut->addHTML( $l );
113116 }
114117
Index: trunk/phase3/includes/SpecialUnwatchedpages.php
@@ -51,7 +51,7 @@
5252 $plink = $skin->makeKnownLinkObj( $nt, htmlspecialchars( $text ) );
5353 $wlink = $skin->makeKnownLinkObj( $nt, wfMsgHtml( 'watch' ), 'action=watch' );
5454
55 - return $plink . ' (' . $wlink . ')';
 55+ return wfSpecialList( $plink, $wlink );
5656 }
5757 }
5858
Index: trunk/phase3/includes/SpecialShortpages.php
@@ -58,7 +58,9 @@
5959 $title = Title::makeTitle( $result->namespace, $result->title );
6060 $link = $skin->makeKnownLinkObj( $title, htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) );
6161 $histlink = $skin->makeKnownLinkObj( $title, wfMsgHtml('hist'), 'action=history' );
62 - return "({$histlink}) $link ({$nb})";
 62+ $dirmark = $wgContLang->getDirMark();
 63+
 64+ return "({$histlink}) {$dirmark}$link {$dirmark}({$nb})";
6365 }
6466 }
6567
Index: trunk/phase3/includes/SpecialUnusedtemplates.php
@@ -43,7 +43,7 @@
4444 Title::makeTitle( NS_SPECIAL, 'Whatlinkshere' ),
4545 wfMsgHtml( 'unusedtemplateswlh' ),
4646 'target=' . $title->getPrefixedUrl() );
47 - return( $pageLink . ' (' . $wlhLink . ')' );
 47+ return wfSpecialList( $pageLink, $wlhLink );
4848 }
4949
5050 function getPageHeader() {
Index: trunk/phase3/includes/SpecialUnusedimages.php
@@ -48,17 +48,25 @@
4949 $title = Title::makeTitle( NS_IMAGE, $result->title );
5050
5151 $imageUrl = htmlspecialchars( Image::imageUrl( $result->title ) );
 52+ $dirmark = $wgContLang->getDirMark(); // To keep text in correct order
 53+
5254 $return =
5355 # The 'desc' linking to the image page
54 - '('.$skin->makeKnownLinkObj( $title, wfMsg('imgdesc') ).') '
 56+ '('.$skin->makeKnownLinkObj( $title, wfMsg('imgdesc') ).') ' . $dirmark .
 57+
5558 # Link to the image itself
56 - . '<a href="' . $imageUrl . '">' . htmlspecialchars( $title->getText() ) . '</a>'
 59+ '<a href="' . $imageUrl . '">' . htmlspecialchars( $title->getText() ) .
 60+ '</a> . . ' . $dirmark .
 61+
5762 # Last modified date
58 - . ' . . '.$wgLang->timeanddate($result->value)
 63+ $wgLang->timeanddate($result->value) . ' . . ' . $dirmark .
 64+
5965 # Link to username
60 - . ' . . '.$skin->makeLinkObj( Title::makeTitle( NS_USER, $result->img_user_text ), $result->img_user_text)
 66+ $skin->makeLinkObj( Title::makeTitle( NS_USER, $result->img_user_text ),
 67+ $result->img_user_text) . $dirmark .
 68+
6169 # If there is a description, show it
62 - . $skin->commentBlock( $wgContLang->convert( $result->img_description ) );
 70+ $skin->commentBlock( $wgContLang->convert( $result->img_description ) );
6371
6472 return $return;
6573 }

Status & tagging log