From: Rotem Liss Date: Wed, 8 Aug 2007 18:37:30 +0000 (+0000) Subject: Adding direction marks between the edit comments and the page name in the contributio... X-Git-Tag: 1.31.0-rc.0~51823 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=854aef23be586b84dbae75bf9d00fb0a357ce12a;p=lhc%2Fweb%2Fwiklou.git Adding direction marks between the edit comments and the page name in the contributions and logs pages, to prevent problems when the direction of both is not the direction of the site (e.g. RTL site, LTR page name and edit comment). --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 3bf9aed608..8b1861bb5d 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -366,6 +366,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN sort keys to work on Safari * (bug 4530) Fix local name of Kurdish language * (bug 10830) Fix local name Haitian Creole language +* Fix comments in contributions and log pages for RTL languages == API changes since 1.10 == diff --git a/includes/SpecialContributions.php b/includes/SpecialContributions.php index d245144455..cd07cbc832 100644 --- a/includes/SpecialContributions.php +++ b/includes/SpecialContributions.php @@ -143,7 +143,7 @@ class ContribsPager extends IndexPager { function formatRow( $row ) { wfProfileIn( __METHOD__ ); - global $wgLang, $wgUser; + global $wgLang, $wgUser, $wgContLang; $sk = $this->getSkin(); $rev = new Revision( $row ); @@ -171,7 +171,7 @@ class ContribsPager extends IndexPager { } $histlink='('.$sk->makeKnownLinkObj( $page, $this->messages['hist'], 'action=history' ) . ')'; - $comment = $sk->revComment( $rev ); + $comment = $wgContLang->getDirMark() . $sk->revComment( $rev ); $d = $wgLang->timeanddate( wfTimestamp( TS_MW, $row->rev_timestamp ), true ); if( $this->target == 'newbies' ) { diff --git a/includes/SpecialLog.php b/includes/SpecialLog.php index 6d251b3ce7..f0794eb56b 100644 --- a/includes/SpecialLog.php +++ b/includes/SpecialLog.php @@ -350,7 +350,7 @@ class LogViewer { * @private */ function logLine( $s ) { - global $wgLang, $wgUser;; + global $wgLang, $wgUser, $wgContLang; $skin = $wgUser->getSkin(); $title = Title::makeTitle( $s->log_namespace, $s->log_title ); $time = $wgLang->timeanddate( wfTimestamp(TS_MW, $s->log_timestamp), true ); @@ -365,7 +365,7 @@ class LogViewer { } $userLink = $this->skin->userLink( $s->log_user, $s->user_name ) . $this->skin->userToolLinksRedContribs( $s->log_user, $s->user_name ); - $comment = $this->skin->commentBlock( $s->log_comment ); + $comment = $wgContLang->getDirMark() . $this->skin->commentBlock( $s->log_comment ); $paramArray = LogPage::extractParams( $s->log_params ); $revert = ''; // show revertmove link