[BUGFIX] SQL error in extension manager
authorPhilipp Gampe <forge.typo3.org@philippgampe.info>
Mon, 6 Feb 2012 00:17:01 +0000 (01:17 +0100)
committerXavier Perseguers <xavier@typo3.org>
Wed, 8 Feb 2012 08:37:55 +0000 (09:37 +0100)
Since #32161 all extension list updates fail because the single
quotes are added twice.

Also fix the other occurence in tx_em_connection_extdirectsoap.

Change-Id: I19f3e4ce6a8444fdce653e6d0fbafae5bbf8d434
Fixes: #33697
Releases: 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/8854
Reviewed-by: Tolleiv Nietsch
Tested-by: Tolleiv Nietsch
Reviewed-by: Stefan Neufeind
Reviewed-by: Helmut Hummel
Reviewed-by: Wouter Wolters
Reviewed-by: Andy Grunwald
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
typo3/sysext/em/classes/connection/class.tx_em_connection_extdirectsoap.php
typo3/sysext/em/classes/database/class.tx_em_database.php

index a521476..8252190 100644 (file)
@@ -341,7 +341,7 @@ class tx_em_Connection_ExtDirectSoap {
                        $row = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow(
                                'extkey, count(version) as uploads',
                                'cache_extensions',
-                               'extkey=\'' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extkey['extensionkey'], 'cache_extensions') . '\' AND repository=1',
+                               'extkey=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extkey['extensionkey'], 'cache_extensions') . ' AND repository=1',
                                'extkey'
                        );
                        $data[$key]['uploads'] = intval($row['uploads']);
index ede8556..ff29bd6 100644 (file)
@@ -237,7 +237,7 @@ final class tx_em_Database {
                        foreach ($groupedRows as $row) {
                                $GLOBALS['TYPO3_DB']->exec_UPDATEquery(
                                        'cache_extensions',
-                                       'extkey=\'' . $GLOBALS['TYPO3_DB']->fullQuoteStr($row['extkey'], 'cache_extensions') . '\' AND intversion=\'' . $GLOBALS['TYPO3_DB']->fullQuoteStr($row['maxintversion'], 'cache_extensions') . '\' AND repository=' . intval($repositoryUid),
+                                       'extkey=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($row['extkey'], 'cache_extensions') . ' AND intversion=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($row['maxintversion'], 'cache_extensions') . ' AND repository=' . intval($repositoryUid),
                                        array('lastversion' => 1)
                                );
                        }