Ori.livneh has uploaded a new change for review.
https://gerrit.wikimedia.org/r/56519
Change subject: (Bug 46612) Do not claim key is full when it isn't
......................................................................
(Bug 46612) Do not claim key is full when it isn't
RawAction was calling MessageCache::singleton()->get() with $title->getDBkey()
as the key. However, it also passed $isFullKey = true, indicating that the key
is "full" (i.e., contains the language code, in the format 'en/foo'). But the
DB key does not match this format, so $isFullKey should be false. Setting it to
false allows get() to use the content language, which is the desired behavior.
Change-Id: I9729b55eb4ffe8f577eb0dc2073c4923b4be595d
---
M includes/actions/RawAction.php
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/19/56519/1
diff --git a/includes/actions/RawAction.php b/includes/actions/RawAction.php
index d1d457c..f6f1076 100644
--- a/includes/actions/RawAction.php
+++ b/includes/actions/RawAction.php
@@ -136,8 +136,8 @@
// If it's a MediaWiki message we can just hit the message cache
if ( $request->getBool( 'usemsgcache' ) &&
$title->getNamespace() == NS_MEDIAWIKI ) {
// The first "true" is to use the database, the second
is to use the content langue
- // and the last one is to specify the message key
already contains the language in it ("/de", etc.)
- $text = MessageCache::singleton()->get(
$title->getDBkey(), true, true, true );
+ // and the last one is to specify the message key does
not include a language code.
+ $text = MessageCache::singleton()->get(
$title->getDBkey(), true, true, false );
// If the message doesn't exist, return a blank
if ( $text === false ) {
$text = '';
--
To view, visit https://gerrit.wikimedia.org/r/56519
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9729b55eb4ffe8f577eb0dc2073c4923b4be595d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.21wmf12
Gerrit-Owner: Ori.livneh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits