Use doctrine dbal consistently

This commit is contained in:
Björn Fromme
2018-06-08 17:16:34 +02:00
parent 3220301161
commit 18d054c1fb
3 changed files with 53 additions and 43 deletions
@@ -27,6 +27,7 @@ namespace EP\EpTheme\DataProcessing;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use EP\EpProducts\Utility\DbUtility;
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
use TYPO3\CMS\Frontend\ContentObject\DataProcessorInterface;
@@ -67,11 +68,16 @@ class ContextProcessor implements DataProcessorInterface
*/
private function getContextRecord($uid, $table)
{
$where = $GLOBALS['TSFE']->sys_page->enableFields($table);
return $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow(
'*',
$table,
$table . '.uid=' . $uid . $where
);
$qb = DbUtility::getDbConnection()->createQueryBuilder();
$query = $qb
->select('*')
->from($table)
->where('uid = :uid')
->andWhere('deleted = 0')
->andWhere('hidden = 0')
->setParameter('uid', $uid)
;
return $query->execute()->fetch();
}
}