From e95ccc4451290b761c799fcd041378815ee3c794 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Mon, 8 May 2006 16:41:05 +0000 Subject: [PATCH] * More BIDI-fixes to special pages --- includes/SpecialImagelist.php | 7 +++++-- includes/SpecialNewpages.php | 9 ++++++--- includes/SpecialShortpages.php | 4 +++- includes/SpecialUnusedimages.php | 18 +++++++++++++----- includes/SpecialUnusedtemplates.php | 2 +- includes/SpecialUnwatchedpages.php | 2 +- 6 files changed, 29 insertions(+), 13 deletions(-) diff --git a/includes/SpecialImagelist.php b/includes/SpecialImagelist.php index 5ef203f22a..b7972166b6 100644 --- a/includes/SpecialImagelist.php +++ b/includes/SpecialImagelist.php @@ -9,7 +9,7 @@ * */ function wfSpecialImagelist() { - global $wgUser, $wgOut, $wgLang, $wgRequest, $wgMiserMode; + global $wgUser, $wgOut, $wgLang, $wgContLang, $wgRequest, $wgMiserMode; $sort = $wgRequest->getVal( 'sort' ); $wpIlMatch = $wgRequest->getText( 'wpIlMatch' ); @@ -95,6 +95,8 @@ function wfSpecialImagelist() { $ul = $sk->makeLinkObj( Title::makeTitle( NS_USER, $ut ), $ut ); } + $dirmark = $wgContLang->getDirMark(); // to keep text in correct direction + $ilink = "" . strtr(htmlspecialchars( $name ), '_', ' ') . ""; @@ -107,7 +109,8 @@ function wfSpecialImagelist() { $date = $wgLang->timeanddate( $s->img_timestamp, true ); $comment = $sk->commentBlock( $s->img_description ); - $l = "({$desc}) {$ilink} . . {$nb} . . {$ul} . . {$date} {$comment}
\n"; + $l = "({$desc}) {$dirmark}{$ilink} . . {$dirmark}{$nb} . . {$dirmark}{$ul}". + " . . {$dirmark}{$date} . . {$dirmark}{$comment}
\n"; $wgOut->addHTML( $l ); } diff --git a/includes/SpecialNewpages.php b/includes/SpecialNewpages.php index c67a24bf5b..3f72352f61 100644 --- a/includes/SpecialNewpages.php +++ b/includes/SpecialNewpages.php @@ -75,6 +75,7 @@ class NewPagesPage extends QueryPage { global $wgLang, $wgContLang, $wgUser, $wgUseRCPatrol; $u = $result->user; $ut = $result->user_text; + $dirmark = $wgContLang->getDirMark(); // To keep text in correct order $length = wfMsgExt( 'nbytes', array('parsemag', 'escape'), $wgLang->formatNum( $result->length ) ); @@ -89,10 +90,12 @@ class NewPagesPage extends QueryPage { $link = $skin->makeKnownLink( $ns . ':' . $result->title, '' ); } - $userTools = $skin->userLink( $u, $ut ) . $skin->userToolLinks( $u, $ut ); + $userLink = $skin->userLink( $u, $ut ); + $userTools = $skin->userToolLinks( $u, $ut ); - $s = "{$d} {$link} ({$length}) . . {$userTools}"; - $s .= $skin->commentBlock( $result->comment ); + $s = "{$d} {$dirmark}{$link} {$dirmark}({$length}) . . " . + "{$dirmark}{$userLink}{$dirmark}{$userTools}"; + $s .= $dirmark . $skin->commentBlock( $result->comment ); return $s; } diff --git a/includes/SpecialShortpages.php b/includes/SpecialShortpages.php index 6867b80eb7..5381e2f3a5 100644 --- a/includes/SpecialShortpages.php +++ b/includes/SpecialShortpages.php @@ -58,7 +58,9 @@ class ShortPagesPage extends QueryPage { $title = Title::makeTitle( $result->namespace, $result->title ); $link = $skin->makeKnownLinkObj( $title, htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) ); $histlink = $skin->makeKnownLinkObj( $title, wfMsgHtml('hist'), 'action=history' ); - return "({$histlink}) $link ({$nb})"; + $dirmark = $wgContLang->getDirMark(); + + return "({$histlink}) {$dirmark}$link {$dirmark}({$nb})"; } } diff --git a/includes/SpecialUnusedimages.php b/includes/SpecialUnusedimages.php index f6fccfb1b4..fa76c57dbb 100644 --- a/includes/SpecialUnusedimages.php +++ b/includes/SpecialUnusedimages.php @@ -48,17 +48,25 @@ class UnusedimagesPage extends QueryPage { $title = Title::makeTitle( NS_IMAGE, $result->title ); $imageUrl = htmlspecialchars( Image::imageUrl( $result->title ) ); + $dirmark = $wgContLang->getDirMark(); // To keep text in correct order + $return = # The 'desc' linking to the image page - '('.$skin->makeKnownLinkObj( $title, wfMsg('imgdesc') ).') ' + '('.$skin->makeKnownLinkObj( $title, wfMsg('imgdesc') ).') ' . $dirmark . + # Link to the image itself - . '' . htmlspecialchars( $title->getText() ) . '' + '' . htmlspecialchars( $title->getText() ) . + ' . . ' . $dirmark . + # Last modified date - . ' . . '.$wgLang->timeanddate($result->value) + $wgLang->timeanddate($result->value) . ' . . ' . $dirmark . + # Link to username - . ' . . '.$skin->makeLinkObj( Title::makeTitle( NS_USER, $result->img_user_text ), $result->img_user_text) + $skin->makeLinkObj( Title::makeTitle( NS_USER, $result->img_user_text ), + $result->img_user_text) . $dirmark . + # If there is a description, show it - . $skin->commentBlock( $wgContLang->convert( $result->img_description ) ); + $skin->commentBlock( $wgContLang->convert( $result->img_description ) ); return $return; } diff --git a/includes/SpecialUnusedtemplates.php b/includes/SpecialUnusedtemplates.php index 8782b8109f..422c5a238f 100644 --- a/includes/SpecialUnusedtemplates.php +++ b/includes/SpecialUnusedtemplates.php @@ -43,7 +43,7 @@ class UnusedtemplatesPage extends QueryPage { Title::makeTitle( NS_SPECIAL, 'Whatlinkshere' ), wfMsgHtml( 'unusedtemplateswlh' ), 'target=' . $title->getPrefixedUrl() ); - return( $pageLink . ' (' . $wlhLink . ')' ); + return wfSpecialList( $pageLink, $wlhLink ); } function getPageHeader() { diff --git a/includes/SpecialUnwatchedpages.php b/includes/SpecialUnwatchedpages.php index aca2a3379d..8cc0802809 100644 --- a/includes/SpecialUnwatchedpages.php +++ b/includes/SpecialUnwatchedpages.php @@ -51,7 +51,7 @@ class UnwatchedpagesPage extends QueryPage { $plink = $skin->makeKnownLinkObj( $nt, htmlspecialchars( $text ) ); $wlink = $skin->makeKnownLinkObj( $nt, wfMsgHtml( 'watch' ), 'action=watch' ); - return $plink . ' (' . $wlink . ')'; + return wfSpecialList( $plink, $wlink ); } } -- 2.20.1