jenkins-bot has submitted this change and it was merged.
Change subject: Add $lang parameter to SpecialVersion::getVersion
......................................................................
Add $lang parameter to SpecialVersion::getVersion
Usage in Scribunto with I712e048367d9d.
Bug: T127233
Change-Id: Id14733aaef3e52a2e315bffe74baeb926d46e238
---
M includes/specials/SpecialVersion.php
1 file changed, 7 insertions(+), 2 deletions(-)
Approvals:
BryanDavis: Looks good to me, approved
Krinkle: Looks good to me, but someone else must approve
Florianschmidtwelzow: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/includes/specials/SpecialVersion.php
b/includes/specials/SpecialVersion.php
index d706786..c0f9590 100644
--- a/includes/specials/SpecialVersion.php
+++ b/includes/specials/SpecialVersion.php
@@ -255,9 +255,10 @@
* Return a string of the MediaWiki version with Git revision if
available.
*
* @param string $flags
+ * @param Language|string|null $lang
* @return mixed
*/
- public static function getVersion( $flags = '' ) {
+ public static function getVersion( $flags = '', $lang = null ) {
global $wgVersion, $IP;
$gitInfo = self::getGitHeadSha1( $IP );
@@ -268,7 +269,11 @@
$version = "$wgVersion ($shortSha1)";
} else {
$shortSha1 = substr( $gitInfo, 0, 7 );
- $shortSha1 = wfMessage( 'parentheses' )->params(
$shortSha1 )->escaped();
+ $msg = wfMessage( 'parentheses' );
+ if ( $lang !== null ) {
+ $msg->inLanguage( $lang );
+ }
+ $shortSha1 = $msg->params( $shortSha1 )->escaped();
$version = "$wgVersion $shortSha1";
}
--
To view, visit https://gerrit.wikimedia.org/r/272894
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id14733aaef3e52a2e315bffe74baeb926d46e238
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: BryanDavis <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Gergő Tisza <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits