Remove deprecation
This commit is contained in:
@@ -27,6 +27,7 @@ namespace EP\EpTrack\Service;
|
|||||||
* This copyright notice MUST APPEAR in all copies of the script!
|
* This copyright notice MUST APPEAR in all copies of the script!
|
||||||
***************************************************************/
|
***************************************************************/
|
||||||
|
|
||||||
|
use EP\EpProducts\Utility\DbUtility;
|
||||||
use TYPO3\CMS\Backend\Utility\BackendUtility;
|
use TYPO3\CMS\Backend\Utility\BackendUtility;
|
||||||
use TYPO3\CMS\Core\Database\DatabaseConnection;
|
use TYPO3\CMS\Core\Database\DatabaseConnection;
|
||||||
use TYPO3\CMS\Core\TimeTracker\NullTimeTracker;
|
use TYPO3\CMS\Core\TimeTracker\NullTimeTracker;
|
||||||
@@ -58,15 +59,20 @@ class RequestService
|
|||||||
public function matchRedirect($currentUri)
|
public function matchRedirect($currentUri)
|
||||||
{
|
{
|
||||||
$uri = strtolower(parse_url($currentUri, \PHP_URL_PATH));
|
$uri = strtolower(parse_url($currentUri, \PHP_URL_PATH));
|
||||||
/** @var DatabaseConnection $db */
|
|
||||||
$db = $GLOBALS['TYPO3_DB'];
|
|
||||||
|
|
||||||
$redirect = $db->exec_SELECTgetSingleRow(
|
$qb = DbUtility::getDbConnection()->createQueryBuilder();
|
||||||
'*',
|
|
||||||
'tx_eptrack_domain_model_redirect',
|
$redirect = $qb
|
||||||
'tx_eptrack_domain_model_redirect.redirect_from=LOWER(' . $db->fullQuoteStr($uri, 'tx_eptrack_domain_model_redirect') . ')'
|
->select('*')
|
||||||
. ' AND tx_eptrack_domain_model_redirect.deleted=0 AND tx_eptrack_domain_model_redirect.hidden=0'
|
->from('tx_eptrack_domain_model_redirect')
|
||||||
);
|
->where('redirect_from = LOWER(:uri)')
|
||||||
|
->andWhere('deleted = 0')
|
||||||
|
->andWhere('hidden = 0')
|
||||||
|
->setParameter('uri', $uri)
|
||||||
|
->execute()
|
||||||
|
->fetch()
|
||||||
|
;
|
||||||
|
|
||||||
if ($redirect === false) {
|
if ($redirect === false) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user