[TASK] Migrate DatabaseConnection->cleanIntList 64/49364/3
authorBenni Mack <benni@typo3.org>
Wed, 3 Aug 2016 18:53:51 +0000 (20:53 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 3 Aug 2016 20:19:07 +0000 (22:19 +0200)
Resolves: #77396
Releases: master
Change-Id: I7fc54266cff850ee7fdf212cf75d3ab79fff084d
Reviewed-on: https://review.typo3.org/49364
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/Domain/Repository/Localization/LocalizationRepository.php
typo3/sysext/backend/Classes/Form/Wizard/SuggestWizard.php
typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/workspaces/Classes/Service/StagesService.php

index 8c74a08..0ba787f 100644 (file)
@@ -160,7 +160,7 @@ class LocalizationRepository
             $additionalWhere .= ' AND sys_language.hidden=0';
 
             if (!empty($backendUser->user['allowed_languages'])) {
             $additionalWhere .= ' AND sys_language.hidden=0';
 
             if (!empty($backendUser->user['allowed_languages'])) {
-                $additionalWhere .= ' AND sys_language.uid IN(' . $this->getDatabaseConnection()->cleanIntList($backendUser->user['allowed_languages']) . ')';
+                $additionalWhere .= ' AND sys_language.uid IN(' . implode(',', GeneralUtility::intExplode(',', $backendUser->user['allowed_languages'])) . ')';
             }
         }
 
             }
         }
 
index 832ffb5..be83b16 100644 (file)
@@ -167,7 +167,7 @@ class SuggestWizard
                         $replacement['###PAGE_TSCONFIG_ID###'] = (int)$fieldTSconfig['PAGE_TSCONFIG_ID'];
                     }
                     if (isset($fieldTSconfig['PAGE_TSCONFIG_IDLIST'])) {
                         $replacement['###PAGE_TSCONFIG_ID###'] = (int)$fieldTSconfig['PAGE_TSCONFIG_ID'];
                     }
                     if (isset($fieldTSconfig['PAGE_TSCONFIG_IDLIST'])) {
-                        $replacement['###PAGE_TSCONFIG_IDLIST###'] = $GLOBALS['TYPO3_DB']->cleanIntList($fieldTSconfig['PAGE_TSCONFIG_IDLIST']);
+                        $replacement['###PAGE_TSCONFIG_IDLIST###'] =  implode(',', GeneralUtility::intExplode(',', $fieldTSconfig['PAGE_TSCONFIG_IDLIST']));
                     }
                     if (isset($fieldTSconfig['PAGE_TSCONFIG_STR'])) {
                         $replacement['###PAGE_TSCONFIG_STR###'] = $GLOBALS['TYPO3_DB']->quoteStr($fieldTSconfig['PAGE_TSCONFIG_STR'], $fieldConfig['foreign_table']);
                     }
                     if (isset($fieldTSconfig['PAGE_TSCONFIG_STR'])) {
                         $replacement['###PAGE_TSCONFIG_STR###'] = $GLOBALS['TYPO3_DB']->quoteStr($fieldTSconfig['PAGE_TSCONFIG_STR'], $fieldConfig['foreign_table']);
index 73c7c50..fe1a7b1 100644 (file)
@@ -281,7 +281,7 @@ abstract class AbstractMenuContentObject
             }
             // 'not in menu' doktypes
             if ($this->conf['excludeDoktypes']) {
             }
             // 'not in menu' doktypes
             if ($this->conf['excludeDoktypes']) {
-                $this->doktypeExcludeList = $this->getDatabaseConnection()->cleanIntList($this->conf['excludeDoktypes']);
+                $this->doktypeExcludeList = implode(',', GeneralUtility::intExplode(',', $this->conf['excludeDoktypes']));
             }
             // EntryLevel
             $this->entryLevel = $this->parent_cObj->getKey(
             }
             // EntryLevel
             $this->entryLevel = $this->parent_cObj->getKey(
index ecf0662..ed55344 100644 (file)
@@ -21,7 +21,6 @@ use TYPO3\CMS\Core\Cache\CacheManager;
 use TYPO3\CMS\Core\Charset\CharsetConverter;
 use TYPO3\CMS\Core\Controller\ErrorPageController;
 use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Charset\CharsetConverter;
 use TYPO3\CMS\Core\Controller\ErrorPageController;
 use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
 use TYPO3\CMS\Core\Error\Http\PageNotFoundException;
 use TYPO3\CMS\Core\Error\Http\ServiceUnavailableException;
 use TYPO3\CMS\Core\Localization\Locales;
 use TYPO3\CMS\Core\Error\Http\PageNotFoundException;
 use TYPO3\CMS\Core\Error\Http\ServiceUnavailableException;
 use TYPO3\CMS\Core\Localization\Locales;
@@ -991,7 +990,7 @@ class TypoScriptFrontendController
         $this->fe_user->lifetime = (int)$GLOBALS['TYPO3_CONF_VARS']['FE']['lifetime'];
         // List of pid's acceptable
         $pid = GeneralUtility::_GP('pid');
         $this->fe_user->lifetime = (int)$GLOBALS['TYPO3_CONF_VARS']['FE']['lifetime'];
         // List of pid's acceptable
         $pid = GeneralUtility::_GP('pid');
-        $this->fe_user->checkPid_value = $pid ? $this->getDatabaseConnection()->cleanIntList($pid) : 0;
+        $this->fe_user->checkPid_value = $pid ? implode(',', GeneralUtility::intExplode(',', $pid)) : 0;
         // Check if a session is transferred:
         if (GeneralUtility::_GP('FE_SESSION_KEY')) {
             $fe_sParts = explode('-', GeneralUtility::_GP('FE_SESSION_KEY'));
         // Check if a session is transferred:
         if (GeneralUtility::_GP('FE_SESSION_KEY')) {
             $fe_sParts = explode('-', GeneralUtility::_GP('FE_SESSION_KEY'));
index efdd164..a32abb7 100644 (file)
@@ -512,7 +512,7 @@ class StagesService implements \TYPO3\CMS\Core\SingletonInterface
             return array();
         }
 
             return array();
         }
 
-        $backendUserList = $this->getDatabaseConnection()->cleanIntList($backendUserList);
+        $backendUserList = implode(',', GeneralUtility::intExplode(',', $backendUserList));
         $backendUsers = BackendUtility::getUserNames(
             'username, uid, email, realName',
             'AND uid IN (' . $backendUserList . ')' . BackendUtility::BEenableFields('be_users')
         $backendUsers = BackendUtility::getUserNames(
             'username, uid, email, realName',
             'AND uid IN (' . $backendUserList . ')' . BackendUtility::BEenableFields('be_users')