From cc4809effc1bb71e31fd3556de68c809ea4ba826 Mon Sep 17 00:00:00 2001 From: Torsten Oppermann <torsten@sgalinski.de> Date: Mon, 11 Dec 2017 09:40:19 +0100 Subject: [PATCH] [TASK] Fixing some filter bugs, wrong column name, casting int missing --- Classes/Controller/JoblistController.php | 2 +- Classes/Service/FrontendFilterService.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Classes/Controller/JoblistController.php b/Classes/Controller/JoblistController.php index 01370687..b4ec970c 100644 --- a/Classes/Controller/JoblistController.php +++ b/Classes/Controller/JoblistController.php @@ -60,7 +60,7 @@ class JoblistController extends ActionController { * @throws \InvalidArgumentException */ public function indexAction() { - $recordPageId = $this->configurationManager->getConfiguration( + $recordPageId = (int) $this->configurationManager->getConfiguration( ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK )['persistence']['storagePid']; diff --git a/Classes/Service/FrontendFilterService.php b/Classes/Service/FrontendFilterService.php index ff5fe91a..1cb8e05b 100644 --- a/Classes/Service/FrontendFilterService.php +++ b/Classes/Service/FrontendFilterService.php @@ -229,7 +229,7 @@ class FrontendFilterService { 'tx_sgjobs_domain_model_company' ); - $statement = $queryBuilder->select('a.function') + $statement = $queryBuilder->select('a.job_function') ->from('tx_sgjobs_domain_model_job', 'a') ->join( 'a', 'tx_sgjobs_domain_model_company', 'b' @@ -274,12 +274,12 @@ class FrontendFilterService { ) ); - $functions = $statement->execute()->fetchAll(); + $jobFunctions = $statement->execute()->fetchAll(); $result = []; $result[0] = ''; - foreach ($functions as $function) { - $result[$function['function']] = $function['function']; + foreach ($jobFunctions as $jobFunction) { + $result[$jobFunction['job_function']] = $jobFunction['job_function']; } return $result; -- GitLab