From: Marcel Werk Date: Wed, 1 Jun 2016 14:34:14 +0000 (+0200) Subject: Added sorted list of search providers X-Git-Tag: 3.0.0_Beta_1~1552 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=840872d2612e779c44e591444c4d1a68165070b4;p=GitHub%2FWoltLab%2FWCF.git Added sorted list of search providers --- 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 ]); }