From 3be61db325d2389758af1e2aca7c066d8582f510 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sun, 14 Oct 2012 09:52:48 +0200 Subject: [PATCH] Fixes Package search and adds language items --- .../search/acp/PackageACPSearchResultProvider.class.php | 8 ++++---- wcfsetup/install/lang/de.xml | 2 ++ wcfsetup/install/lang/en.xml | 2 ++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/system/search/acp/PackageACPSearchResultProvider.class.php b/wcfsetup/install/files/lib/system/search/acp/PackageACPSearchResultProvider.class.php index c708c3b18e..79b0b5cbbc 100644 --- a/wcfsetup/install/files/lib/system/search/acp/PackageACPSearchResultProvider.class.php +++ b/wcfsetup/install/files/lib/system/search/acp/PackageACPSearchResultProvider.class.php @@ -29,7 +29,7 @@ class PackageACPSearchResultProvider implements IACPSearchResultProvider { // search by language item $conditions = new PreparedStatementConditionBuilder(); $conditions->add("languageID = ?", array(WCF::getLanguage()->languageID)); - $conditions->add("languageItem LIKE ?", array('wcf.acp.package.title.package%')); + $conditions->add("languageItem LIKE ?", array('wcf.acp.package.packageName.package%')); $conditions->add("languageItemValue LIKE ?", array($query.'%')); $conditions->add("packageID IN (?)", array(PackageDependencyHandler::getInstance()->getDependencies())); @@ -41,7 +41,7 @@ class PackageACPSearchResultProvider implements IACPSearchResultProvider { $packageIDs = array(); while ($row = $statement->fetchArray()) { - $packageIDs[] = str_replace('wcf.acp.package.title.package', '', $row['languageItem']); + $packageIDs[] = str_replace('wcf.acp.package.packageName.package', '', $row['languageItem']); } $conditions = new PreparedStatementConditionBuilder(false); @@ -55,10 +55,10 @@ class PackageACPSearchResultProvider implements IACPSearchResultProvider { OR package LIKE ? ".(count($conditions->getParameters()) ? "OR ".$conditions : ""); $statement = WCF::getDB()->prepareStatement($sql); - $statement->execute(array_merge($conditions->getParameters(), array( + $statement->execute(array_merge(array( $query.'%', $query.'%' - ))); + ), $conditions->getParameters())); while ($package = $statement->fetchObject('wcf\data\package\Package')) { $results[] = new ACPSearchResult($package->getName(), LinkHandler::getInstance()->getLink('PackageView', array( diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 958582ab0f..1d22268a66 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -340,6 +340,8 @@ + + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index ab17f8a37b..edf482ed89 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -340,6 +340,8 @@ + + -- 2.20.1