From 641633f6641f0f9e35c53a6b11c5113b1514a504 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 26 Nov 2013 00:39:00 +0100 Subject: [PATCH] Sort exporters by name in DataImportForm --- .../install/files/lib/acp/form/DataImportForm.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wcfsetup/install/files/lib/acp/form/DataImportForm.class.php b/wcfsetup/install/files/lib/acp/form/DataImportForm.class.php index 7858dfd813..c961e89ab2 100644 --- a/wcfsetup/install/files/lib/acp/form/DataImportForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/DataImportForm.class.php @@ -134,6 +134,12 @@ class DataImportForm extends AbstractForm { // get available exporters/importers $this->exporters = ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.exporter'); + + // sort exporters by name + uksort($this->exporters, function ($a, $b) { + return strcasecmp(WCF::getLanguage()->get('wcf.acp.dataImport.exporter.'.$a), WCF::getLanguage()->get('wcf.acp.dataImport.exporter.'.$b)); + }); + $this->importers = array_keys(ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.importer')); if (isset($_REQUEST['exporterName'])) { -- 2.20.1