Gergő Tisza has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/392720 )
Change subject: Inline sort helper
......................................................................
Inline sort helper
Change-Id: Ice8936b50f96d9bcf8430468efeff315305121a5
---
M includes/SiteMatrix.php
1 file changed, 3 insertions(+), 10 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SiteMatrix
refs/changes/20/392720/1
diff --git a/includes/SiteMatrix.php b/includes/SiteMatrix.php
index e3e4fc6..5c382b3 100644
--- a/includes/SiteMatrix.php
+++ b/includes/SiteMatrix.php
@@ -86,7 +86,9 @@
}
}
- uasort( $this->specials, [ __CLASS__, 'sortSpecial' ] );
+ uasort( $this->specials, function ( $a1, $a2 ) {
+ return strcmp( $a1[0], $a2[0] );
+ } );
if ( $hideEmpty ) {
foreach ( $xLanglist as $lang => $unused ) {
@@ -104,15 +106,6 @@
}
$this->count = count( $wgLocalDatabases );
- }
-
- /**
- * @param array $a1
- * @param array $a2
- * @return int
- */
- public static function sortSpecial( $a1, $a2 ) {
- return strcmp( $a1[0], $a2[0] );
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/392720
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice8936b50f96d9bcf8430468efeff315305121a5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SiteMatrix
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits