Changeset 6051
- Timestamp:
- 05/25/07 12:38:02 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/org.openpsa.products/handler/product/search.php
r5391 r6051 40 40 { 41 41 case '<': 42 case 'lt': 42 43 case '<=': 44 case 'lte': 43 45 case '=': 46 case 'eq': 44 47 case '<>': 48 case '!eq': 45 49 case '>=': 50 case 'gte': 46 51 case '>': 52 case 'gt': 47 53 case 'LIKE': 54 case 'NOT LIKE': 48 55 return true; 49 56 default: … … 52 59 } 53 60 61 function _normalize_operator($operator) 62 { 63 switch ($operator) 64 { 65 case 'lt': 66 return '<'; 67 case 'gt': 68 return '>'; 69 case 'lte': 70 return '<='; 71 case 'gte': 72 return '>='; 73 case '!eq': 74 return '<>'; 75 case 'eq': 76 return '='; 77 default: 78 return $operator; 79 } 80 } 81 54 82 /** 55 83 * Check each search constraint for validity and normalize … … 84 112 continue; 85 113 } 114 115 $constraint['constraint'] = $this->_normalize_operator($constraint['constraint']); 86 116 87 117 if ( !array_key_exists('value', $constraint)
