From: Niklas Laxström Date: Wed, 26 Oct 2005 15:45:30 +0000 (+0000) Subject: * (bug 2324) image for redirects should be without text and oriented according to... X-Git-Tag: 1.6.0~1304 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=786db07dded0ca30f3696127ec417edf6ff7a4b7;p=lhc%2Fweb%2Fwiklou.git * (bug 2324) image for redirects should be without text and oriented according to content language --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 2cc8e166f6..3f3b241f0d 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -173,6 +173,7 @@ fully support the editing toolbar, but was found to be too confusing. * Sanitizer CSS comment processing order fix * Edit box now remembers scrollbar position on preview * (bug 3798) DoubleRedirects no longer has hard coded arrows +* (bug 2324) image for redirects should be without text and oriented according to content language === Caveats === diff --git a/includes/Article.php b/includes/Article.php index 51c2c9970a..35fb57be3c 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -671,7 +671,7 @@ class Article { * the given title. */ function view() { - global $wgUser, $wgOut, $wgRequest, $wgOnlySysopsCanPatrol, $wgLang; + global $wgUser, $wgOut, $wgRequest, $wgOnlySysopsCanPatrol, $wgLang, $wgContLang; global $wgLinkCache, $IP, $wgEnableParserCache, $wgStylePath, $wgUseRCPatrol; global $wgEnotif, $wgParser, $wgParserCache, $wgUseTrackbacks; $sk = $wgUser->getSkin(); @@ -778,7 +778,9 @@ class Article { $wgOut->addHTML( '
'.htmlspecialchars($this->mContent)."\n
" ); } else if ( $rt = Title::newFromRedirect( $text ) ) { # Display redirect - $imageUrl = $wgStylePath.'/common/images/redirect.png'; + $imageDir = $wgContLang->isRTL() ? 'rtl' : 'ltr'; + $imageUrl = $wgStylePath.'/common/images/redirect' . $imageDir . '.png'; + $wgOut->setSubtitle( wfMsgHtml( 'redirectpagesub' ) ); $targetUrl = $rt->escapeLocalURL(); $titleText = htmlspecialchars( $rt->getPrefixedText() ); $link = $sk->makeLinkObj( $rt ); diff --git a/languages/Language.php b/languages/Language.php index efeba091ee..2ce4513aca 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -442,6 +442,7 @@ parent class in order maintain consistency across languages. 'viewtalkpage' => 'View discussion', 'otherlanguages' => 'In other languages', 'redirectedfrom' => '(Redirected from $1)', +'redirectpagesub' => 'Redirect page', 'lastmodified' => 'This page was last modified $1.', 'viewcount' => 'This page has been accessed $1 times.', 'copyright' => 'Content is available under $1.', diff --git a/skins/common/images/redirect.png b/skins/common/images/redirect.png deleted file mode 100644 index 7b2b071f8c..0000000000 Binary files a/skins/common/images/redirect.png and /dev/null differ diff --git a/skins/common/images/redirectltr.png b/skins/common/images/redirectltr.png new file mode 100644 index 0000000000..8d228c99d1 Binary files /dev/null and b/skins/common/images/redirectltr.png differ diff --git a/skins/common/images/redirectrtl.png b/skins/common/images/redirectrtl.png new file mode 100644 index 0000000000..0122eefdcf Binary files /dev/null and b/skins/common/images/redirectrtl.png differ