View Issue Details

IDProjectCategoryView StatusLast Update
0005499OXID eShop (all versions)4.01. Database handlingpublic2013-11-06 15:35
ReporterPrintusOxid Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformOXID PEOSWindowsOS VersionXP/7
Product Version4.7.8 / 5.0.8 
Fixed in Version4.7.10 / 5.0.10 
Summary0005499: oxadminlist - _calcListItemsCount() - sql has to be lowercase. Correction to ignore case.
Descriptionbackend provides several lists to show products/categories/... (oxadminlist)
for example category_list.
one fundtion is found in core modul oxadminlist, _calcListItemsCount().

For this method the sql-code has to be writen in lowercase:

$sSql = $oStr->preg_replace( '/select .* from/', 'select count(*) from ', $sSql );

It is saver to ignore the case of sql-code:
$sSql = $oStr->preg_replace( '/select .* from/i', 'select count(*) from ', $sSql ); - in all replacements of this method.

if the sql-code is not writen in lowercase, the count ist not executed an a wrong number is shown.
Steps To ReproduceCreating an own list depending on oxadminlist. Write SQL-Code in mixed-case or uppercase. ( for example replace the method _buildSelectString() )
The count of relevant things will be incorrect.
Additional InformationI have to create several modules, with different list-selections so I had to make an own module to correct this function to be shure the correct count is executed.
TagsNo tags attached.
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Activities

Linas Kukulskis

2013-11-06 15:35

reporter   ~0009236

added i