Actions
Bug #38406
closedExtension Import not working with postgresql and DBAL
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extension Manager
Target version:
-
Start date:
2012-06-26
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
the import of extensions is not working completely with DBAL on postgresql.
the problem lies in the function "insertLastVersion" in the file:
"/typo3/sysext/em/classes/database/class.tx_em_database.php"
on line 220, the following code:
$groupedRows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
'extkey, version, max(intversion) maxintversion',
'cache_extensions',
'repository=' . intval($repositoryUid),
'extkey'
);
... results in the following SQL-statement:
SELECT "extkey", "version", max("intversion") "maxintversion" FROM "cache_extensions" WHERE "repository" = 1 GROUP BY "extkey"
this is not valid in postgres due to:
1. "as" missing between max("intversion") and "maxintversion"
2. "version" missing from the group-clause
thus, the code must be changed to the following:
$groupedRows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
'extkey, version, max(intversion) as maxintversion',
'cache_extensions',
'repository=' . intval($repositoryUid),
'extkey, version'
);
Actions