From: kaldari Date: Mon, 24 Mar 2014 22:57:59 +0000 (-0700) Subject: Always render copyright notice in user language X-Git-Tag: 1.31.0-rc.0~15675 X-Git-Url: http://git.cyclocoop.org/%22%2C%20generer_url_ecrire%28?a=commitdiff_plain;h=97a145f1fb403e630ddcf22d39aeada4ef2ffa97;p=lhc%2Fweb%2Fwiklou.git Always render copyright notice in user language All other footer content is rendered in the user language and the copyright notice on the edit page is also in the user language. See EditPage::getCopyrightWarning(). We already do this on WMF wikis through the WikimediaMessages extension (which sets $forContent to false). The same behaviour has been requested for 3rd party wikis as well. Bug: 49116 Change-Id: I1dddfa7771c7063ec319fa441c2e400a374abc92 --- diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index a666610483..bb8dd22e0a 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -32,6 +32,8 @@ production. * (bug 44740) jQuery upgraded from 1.8.3 to 1.11.1. === Bug fixes in 1.24 === +* (bug 49116) Footer copyright notice is now always displayed in user language + rather than content language (same as copyright notice for editing interface). * (bug 62258) A bug was fixed in File::getUnscaledThumb when a height restriction was present in the parameters. Images with both the "frame" option and a size specification set will now always ignore the provided diff --git a/docs/hooks.txt b/docs/hooks.txt index d1507a2e89..0c03375539 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -2259,6 +2259,7 @@ $type: 'normal' or 'history' for old/diff views message must be in HTML format, not wikitext! &$link: overridable HTML link to be passed into the message as $1 &$forContent: overridable flag if copyright footer is shown in content language. + This parameter is deprecated. 'SkinGetPoweredBy': TODO &$text: additional 'powered by' icons in HTML. Note: Modern skin does not use diff --git a/includes/Skin.php b/includes/Skin.php index 9d1034b671..c428079557 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -830,6 +830,7 @@ abstract class Skin extends ContextSource { } // Allow for site and per-namespace customization of copyright notice. + // @todo Remove deprecated $forContent param from hook handlers and then remove here. $forContent = true; wfRunHooks( @@ -837,20 +838,7 @@ abstract class Skin extends ContextSource { array( $this->getTitle(), $type, &$msg, &$link, &$forContent ) ); - $msgObj = $this->msg( $msg )->rawParams( $link ); - if ( $forContent ) { - $msg = $msgObj->inContentLanguage()->text(); - if ( $this->getLanguage()->getCode() !== $wgContLang->getCode() ) { - $msg = Html::rawElement( 'span', array( - 'lang' => $wgContLang->getHtmlCode(), - 'dir' => $wgContLang->getDir() - ), $msg ); - } - - return $msg; - } else { - return $msgObj->text(); - } + return $this->msg( $msg )->rawParams( $link )->text(); } /**