Reedy has uploaded a new change for review.
https://gerrit.wikimedia.org/r/105473
Change subject: Swap global functions for closures
......................................................................
Swap global functions for closures
Change-Id: Ib811d11a58621d14c0549b5a97b7f735fd3addab
---
M wmf-config/CommonSettings.php
1 file changed, 13 insertions(+), 17 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config
refs/changes/73/105473/1
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 4380d4d..d5d4104 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2105,27 +2105,23 @@
$wgTranslateEC = array();
- function addSidebarMessageGroup( $id ) {
- $mg = new WikiMessageGroup( $id, 'sidebar-messages' );
- $mg->setLabel( 'Sidebar' );
- $mg->setDescription( 'Messages used in the sidebar of this
wiki' );
- return $mg;
- }
-
- function addTranslatableMessageGroup( $id ) {
- $mg = new WikiMessageGroup( $id, 'translatable-messages' );
- $mg->setLabel( 'Interface' );
- $mg->setDescription( 'Messages used in the custom interface of
this wiki' );
- return $mg;
- }
-
if ( $wgDBname === 'wikimania2013wiki' ) {
- $wgTranslateCC['wiki-sidebar'] = 'addSidebarMessageGroup';
+ $wgTranslateCC['wiki-sidebar'] = function ( $id ) {
+ $mg = new WikiMessageGroup( $id, 'sidebar-messages' );
+ $mg->setLabel( 'Sidebar' );
+ $mg->setDescription( 'Messages used in the sidebar of
this wiki' );
+ return $mg;
+ };
}
if ( $wgDBname === 'commonswiki' ) {
- $wgTranslateCC['wiki-translatable'] =
'addTranslatableMessageGroup';
- }
+ $wgTranslateCC['wiki-translatable'] = function ( $id ) {
+ $mg = new WikiMessageGroup( $id,
'translatable-messages' );
+ $mg->setLabel( 'Interface' );
+ $mg->setDescription( 'Messages used in the custom
interface of this wiki' );
+ return $mg;
+ };
+ };
unset( $wgSpecialPages['FirstSteps'] );
unset( $wgSpecialPages['ManageMessageGroups'] );
--
To view, visit https://gerrit.wikimedia.org/r/105473
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib811d11a58621d14c0549b5a97b7f735fd3addab
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits