jenkins-bot has submitted this change and it was merged. ( 
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(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



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: merged
Gerrit-Change-Id: Ice8936b50f96d9bcf8430468efeff315305121a5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SiteMatrix
Gerrit-Branch: master
Gerrit-Owner: GergÅ‘ Tisza <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to