[BUGFIX] Fix SQL syntax
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Resource / FileRepository.php
index 623fa84..bfb391d 100644 (file)
@@ -151,10 +151,10 @@ class FileRepository extends AbstractRepository {
                $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
                        '*',
                        $this->table,
-                       sprintf('storage=%u AND identifier LIKE "%s" AND NOT identifier LIKE "%s"',
+                       sprintf('storage=%u AND identifier LIKE %s AND NOT identifier LIKE %s',
                                        $storage,
-                                       $GLOBALS['TYPO3_DB']->escapeStrForLike($identifier, $this->table) . '%',
-                                       $GLOBALS['TYPO3_DB']->escapeStrForLike($identifier, $this->table) . '%/%'
+                                       $GLOBALS['TYPO3_DB']->fullQuoteStr($GLOBALS['TYPO3_DB']->escapeStrForLike($identifier, $this->table) . '%', $this->table),
+                                       $GLOBALS['TYPO3_DB']->fullQuoteStr($GLOBALS['TYPO3_DB']->escapeStrForLike($identifier, $this->table) . '%/%', $this->table)
                        ),
                        '',
                        '',
@@ -275,4 +275,4 @@ class FileRepository extends AbstractRepository {
 
 }
 
-?>
\ No newline at end of file
+?>