From 840872d2612e779c44e591444c4d1a68165070b4 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Wed, 1 Jun 2016 16:34:14 +0200 Subject: [PATCH] Added sorted list of search providers --- .../install/files/acp/templates/pageHeaderSearch.tpl | 4 ++-- wcfsetup/install/files/lib/system/WCFACP.class.php | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/acp/templates/pageHeaderSearch.tpl b/wcfsetup/install/files/acp/templates/pageHeaderSearch.tpl index 7268bec2af..35f8ffa945 100644 --- a/wcfsetup/install/files/acp/templates/pageHeaderSearch.tpl +++ b/wcfsetup/install/files/acp/templates/pageHeaderSearch.tpl @@ -6,8 +6,8 @@
  • {lang}wcf.search.type.everywhere{/lang}
  • - {foreach from=$availableAcpSearchProviders item='availableAcpSearchProvider'} -
  • {lang}wcf.acp.search.provider.{@$availableAcpSearchProvider->providerName}{/lang}
  • + {foreach from=$availableAcpSearchProviders key='availableAcpSearchProviderName' item='availableAcpSearchProviderLabel'} +
  • {@$availableAcpSearchProviderLabel}
  • {/foreach} diff --git a/wcfsetup/install/files/lib/system/WCFACP.class.php b/wcfsetup/install/files/lib/system/WCFACP.class.php index 41ceec09b9..e7d0ab2726 100644 --- a/wcfsetup/install/files/lib/system/WCFACP.class.php +++ b/wcfsetup/install/files/lib/system/WCFACP.class.php @@ -212,9 +212,16 @@ class WCFACP extends WCF { $host = RouteHandler::getHost(); $path = RouteHandler::getPath(); + // available acp search providers + $availableAcpSearchProviders = []; + foreach (ACPSearchProviderCacheBuilder::getInstance()->getData() as $searchProvider) { + $availableAcpSearchProviders[$searchProvider->providerName] = self::getLanguage()->get('wcf.acp.search.provider.'.$searchProvider->providerName); + } + asort($availableAcpSearchProviders); + self::getTPL()->assign([ 'baseHref' => $host . $path, - 'availableAcpSearchProviders' => ACPSearchProviderCacheBuilder::getInstance()->getData() + 'availableAcpSearchProviders' => $availableAcpSearchProviders ]); } -- 2.20.1