View Issue Details

IDProjectCategoryView StatusLast Update
0001692OXID eShop (all versions)2. ----- eShop backend (admin) -----public2010-05-21 15:32
ReporterMoehlis Assigned To 
PrioritynormalSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.2.0 revision 23610 
Fixed in Version4.3.2 revision 27884 
Summary0001692: search for special chars in articlelist works incorrectly
Descriptionwhen searching for article name with specialchars we have a strange effect:
- searching for "<word with special char> <normal word>" will result in an OR search
- searching for "<normal word> <word with special char>" will result in an AND search

problem source seems to be oxadminlist.php:_prepareWhereQuery():540-545
$sUml = $myUtilsString->prepareStrForSearch( $sVal );
if ( $sUml ) {
     $sqlFull .= " or {$sFieldName} ";
     $sqlFull .= $this->_buildFilter( $sUml, $blIsSearchValue );
}

it will create a query like:
oxv_oxarticles_1.OXTITLE like '%wandühr%' or oxv_oxarticles_1.OXTITLE like '%wandühr%' and oxv_oxarticles_1.OXTITLE like '%digital%


as a simple workaround, i added brackets:
...
foreach ( $aVal as $sVal) {

    $sFieldName = oxDb::getInstance()->escapeString( $sFieldName );
    $sqlFull .= " {$sSqlBoolAction} ({$sFieldName} "; // added bracket
    ...
    $sqlFull .= ')'; // added line
}
...
TagsNo tags attached.
Theme
BrowserAll
PHP Versionany
Database Versionany

Activities

sarunas_valaskevicius

2010-05-19 15:44

reporter   ~0002942

fixed in oxAdminList::_prepareWhereQuery