[BUGFIX] Indexed_search: Fix access to 'blind' settings in extbase plugin 31/37931/2
authorTymoteusz Motylewski <t.motylewski@gmail.com>
Tue, 17 Mar 2015 18:21:02 +0000 (19:21 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Wed, 18 Mar 2015 19:01:03 +0000 (20:01 +0100)
$this->settings['blind.'] always return null in extbase context,
we should use ['blind'] instead.

Resolves: #65816
Releases: master, 6.2
Change-Id: Ia64bf15dd6cde04f22b0184431c01e4d482fb113
Reviewed-on: http://review.typo3.org/37931
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/indexed_search/Classes/Controller/SearchController.php

index a8d1216..687df91 100644 (file)
@@ -854,7 +854,7 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle
        protected function getAllAvailableSearchTypeOptions() {
                $allOptions = array();
                $types = array(0, 1, 2, 3, 10, 20);
-               $blindSettings = $this->settings['blind.'];
+               $blindSettings = $this->settings['blind'];
                if (!$blindSettings['searchType']) {
                        foreach ($types as $typeNum) {
                                $allOptions[$typeNum] = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('searchTypes.' . $typeNum, 'indexed_search');
@@ -876,7 +876,7 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle
         */
        protected function getAllAvailableOperandsOptions() {
                $allOptions = array();
-               $blindSettings = $this->settings['blind.'];
+               $blindSettings = $this->settings['blind'];
                if (!$blindSettings['defaultOperand']) {
                        $allOptions = array(
                                0 => \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('defaultOperands.0', 'indexed_search'),
@@ -896,7 +896,7 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle
        protected function getAllAvailableMediaTypesOptions() {
                $allOptions = array();
                $mediaTypes = array(-1, 0, -2);
-               $blindSettings = $this->settings['blind.'];
+               $blindSettings = $this->settings['blind'];
                if (!$blindSettings['mediaType']) {
                        foreach ($mediaTypes as $mediaType) {
                                $allOptions[$mediaType] = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('mediaTypes.' . $mediaType, 'indexed_search');
@@ -931,7 +931,7 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle
                        '-1' => \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('languageUids.-1', 'indexed_search'),
                        '0' => \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('languageUids.0', 'indexed_search')
                );
-               $blindSettings = $this->settings['blind.'];
+               $blindSettings = $this->settings['blind'];
                if (!$blindSettings['languageUid']) {
                        // Add search languages
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_language', '1=1' . $GLOBALS['TSFE']->cObj->enableFields('sys_language'));
@@ -960,7 +960,7 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle
        protected function getAllAvailableSectionsOptions() {
                $allOptions = array();
                $sections = array(0, -1, -2, -3);
-               $blindSettings = $this->settings['blind.'];
+               $blindSettings = $this->settings['blind'];
                if (!$blindSettings['sections']) {
                        foreach ($sections as $section) {
                                $allOptions[$section] = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('sections.' . $section, 'indexed_search');
@@ -1008,7 +1008,7 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle
                        '-2' => \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('indexingConfigurations.-2', 'indexed_search'),
                        '0' => \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('indexingConfigurations.0', 'indexed_search')
                );
-               $blindSettings = $this->settings['blind.'];
+               $blindSettings = $this->settings['blind'];
                if (!$blindSettings['indexingConfigurations']) {
                        // add an additional index configuration
                        if ($this->settings['defaultFreeIndexUidList']) {
@@ -1040,7 +1040,7 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle
        protected function getAllAvailableSortOrderOptions() {
                $allOptions = array();
                $sortOrders = array('rank_flag', 'rank_freq', 'rank_first', 'rank_count', 'mtime', 'title', 'crdate');
-               $blindSettings = $this->settings['blind.'];
+               $blindSettings = $this->settings['blind'];
                if (!$blindSettings['sortOrder']) {
                        foreach ($sortOrders as $order) {
                                $allOptions[$order] = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('sortOrders.' . $order, 'indexed_search');
@@ -1058,7 +1058,7 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle
         */
        protected function getAllAvailableGroupOptions() {
                $allOptions = array();
-               $blindSettings = $this->settings['blind.'];
+               $blindSettings = $this->settings['blind'];
                if (!$blindSettings['groupBy']) {
                        $allOptions = array(
                                'sections' => \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('groupBy.sections', 'indexed_search'),
@@ -1077,7 +1077,7 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle
         */
        protected function getAllAvailableSortDescendingOptions() {
                $allOptions = array();
-               $blindSettings = $this->settings['blind.'];
+               $blindSettings = $this->settings['blind'];
                if (!$blindSettings['descending']) {
                        $allOptions = array(
                                0 => \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('sortOrders.descending', 'indexed_search'),
@@ -1096,7 +1096,7 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle
         */
        protected function getAllAvailableNumberOfResultsOptions() {
                $allOptions = array();
-               $blindSettings = $this->settings['blind.'];
+               $blindSettings = $this->settings['blind'];
                if (!$blindSettings['numberOfResults']) {
                        $allOptions = array(
                                10 => 10,