Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
Rudi Grinberg 2012-08-28 11:54:47 -04:00
commit c1505f8bd2
1 changed files with 11 additions and 0 deletions

View File

@ -1187,6 +1187,16 @@ EOT;
if (isset($criteria['extra'])) {
$spCriteriaExtra = $criteria['extra']*1000;
}
/*
* If user is searching for an exact match of length we need to
* search as if it starts with the specified length because the
* user only sees the rounded version (i.e. 4:02.7 is 4:02.761625
* in the database)
*/
} else if ($spCriteria == 'length' && $spCriteriaModifier == "is") {
$spCriteriaModifier = "starts with";
$spCriteria = $spCriteria.'::text';
$spCriteriaValue = $criteria['value'];
} else {
/* Propel does not escape special characters properly when using LIKE/ILIKE
* We have to add extra slashes in these cases
@ -1214,6 +1224,7 @@ EOT;
}
$spCriteriaModifier = self::$modifier2CriteriaMap[$spCriteriaModifier];
try {
if ($i > 0) {
$qry->addOr($spCriteria, $spCriteriaValue, $spCriteriaModifier);