View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005499 | OXID eShop (all versions) | 4.01. Database handling | public | 2013-11-05 09:18 | 2013-11-06 15:35 |
Reporter | PrintusOxid | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | OXID PE | OS | Windows | OS Version | XP/7 |
Product Version | 4.7.8 / 5.0.8 | ||||
Fixed in Version | 4.7.10 / 5.0.10 | ||||
Summary | 0005499: oxadminlist - _calcListItemsCount() - sql has to be lowercase. Correction to ignore case. | ||||
Description | backend 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 Reproduce | Creating 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 Information | I 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. | ||||
Tags | No tags attached. | ||||
Theme | Both | ||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||