Index: trunk/kernel/include/parseditem.php =================================================================== diff -u -N -r1069 -r1072 --- trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 1069) +++ trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 1072) @@ -2469,7 +2469,8 @@ $sql .= $this->GetJoinedSQL($p,$catid,$where); $OrderBy = $this->QueryOrderByClause(TRUE,TRUE,TRUE); - $sql .= " ".$OrderBy; + $sql .= " ".$OrderBy; + return $sql; } Index: trunk/kernel/frontaction.php =================================================================== diff -u -N -r1061 -r1072 --- trunk/kernel/frontaction.php (.../frontaction.php) (revision 1061) +++ trunk/kernel/frontaction.php (.../frontaction.php) (revision 1072) @@ -843,16 +843,19 @@ $key_arr = explode(' ', $keywords); foreach($key_arr as $value) { - if (strlen($value) < $length) { + if (strlen(str_replace("+", "", $value)) < $length || strlen(str_replace("-", "", $value)) < $length) { $keywords = str_replace(' '.$value, '', $keywords); - $keywords = str_replace($value.' ', '', $keywords); + $keywords = str_replace($value.' ', '', $keywords); } } //$keywords = str_replace(' ', ' ', $keywords); //$keywords = str_replace('\"', '', $keywords); - $performSearch = (strlen($keywords) >= $length); + $tmp_keywords = str_replace("+", "", $keywords); + $tmp_keywords = str_replace("-", "", $tmp_keywords); + + $performSearch = (strlen($tmp_keywords) >= $length); } if ($performSearch) { @@ -971,7 +974,10 @@ //$keywords = str_replace(' ', ' ', $keywords); - $performSearch = (strlen($keywords) >= $length); + $tmp_keywords = str_replace("+", "", $keywords); + $tmp_keywords = str_replace("-", "", $tmp_keywords); + + $performSearch = (strlen($tmp_keywords) >= $length); } if ($performSearch) { Index: trunk/kernel/include/itemdb.php =================================================================== diff -u -N -r1022 -r1072 --- trunk/kernel/include/itemdb.php (.../itemdb.php) (revision 1022) +++ trunk/kernel/include/itemdb.php (.../itemdb.php) (revision 1072) @@ -463,12 +463,17 @@ //echo "MAX SQL: $sql
"; $new_val = $rs->fields['max_value'] + 1; - $sql = "SELECT count($field) AS count FROM ".$this->tablename." WHERE $field = $new_val"; - $rsc = $this->adodbConnection->Execute($sql); - //echo "New Value:$new_val
"; - if ($rsc->fields['count'] > 0) { - $new_val = $new_val + 0.000001; - } + $sql = "SELECT count($field) AS count FROM ".$this->tablename." WHERE $field = $new_val"; + $rsc = $this->adodbConnection->Execute($sql); + + while ($rsc->fields['count'] != 0) { + $sql = "SELECT count($field) AS count FROM ".$this->tablename." WHERE $field = $new_val"; + $rsc = $this->adodbConnection->Execute($sql); + //echo "New Value:$new_val
"; + if ($rsc->fields['count'] > 0) { + $new_val = $new_val + 0.000001; + } + } $sql = "Update ".$this->tablename." set $field=$new_val where ".$this->IdField()."=" . $this->UniqueId(); }