summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'MLEB/Translate/messagegroups/SandboxMessageGroup.php')
-rw-r--r--MLEB/Translate/messagegroups/SandboxMessageGroup.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/MLEB/Translate/messagegroups/SandboxMessageGroup.php b/MLEB/Translate/messagegroups/SandboxMessageGroup.php
index 13edb914..f0aa1d8b 100644
--- a/MLEB/Translate/messagegroups/SandboxMessageGroup.php
+++ b/MLEB/Translate/messagegroups/SandboxMessageGroup.php
@@ -4,7 +4,7 @@
*
* @file
* @author Niklas Laxström
- * @license GPL-2.0+
+ * @license GPL-2.0-or-later
*/
/**
@@ -48,7 +48,7 @@ class SandboxMessageGroup extends WikiMessageGroup {
global $wgTranslateSandboxSuggestions, $wgTranslateSandboxLimit;
// This will contain the list of messages shown to the user
- $list = array();
+ $list = [];
// Ugly
$store = new TranslationStashStorage( wfGetDB( DB_MASTER ) );
@@ -77,12 +77,10 @@ class SandboxMessageGroup extends WikiMessageGroup {
$list[$index] = '';
}
- // Message index of all known messages
- $mi = MessageIndex::singleton();
// Get some random keys
- $all = array_keys( $mi->retrieve() );
+ $all = MessageIndex::singleton()->getKeys();
// In case there aren't any messages
- if ( $all === array() ) {
+ if ( $all === [] ) {
return $list;
}
$min = 0;
@@ -143,6 +141,8 @@ class SandboxMessageGroup extends WikiMessageGroup {
/**
* Subpage language code, if any in the title, is ignored.
+ * @param MessageHandle $handle
+ * @return null|string
*/
public function getMessageContent( MessageHandle $handle ) {
$groupId = MessageIndex::getPrimaryGroupId( $handle );