another fix for '/foo', '/=foo' and '/unknown=foo'

This commit is contained in:
rlx 2011-10-08 11:15:10 +00:00
parent bf533cd2fe
commit 0994a6243f

View file

@ -308,14 +308,12 @@ Ox.URL = function(options) {
return false;
}
});
if (!condition.operator) {
// missing operator
condition = {key: '*', value: condition.value, operator: '='};
} else if (!condition.key) {
// missing key
condition.key = '*';
} else if (Ox.getPositionById(self.options.findKeys, condition.key) == -1) {
// unknown key
condition.key = condition.key || '*';
if (
!condition.operator
|| Ox.getPositionById(self.options.findKeys, condition.key) == -1
) {
// missing operator or unknown key
condition = {key: '*', value: str, operator: '='};
}
if (['=', '!='].indexOf(condition.operator) > -1) {