Codebase list awl / 120df01
Fix param-filter for multi-value parameters with TYPE=T1,T2 format Michael Stilkerich authored 3 years ago Florian Schlichting committed 3 years ago
1 changed file(s) with 13 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
471471 case 'urn:ietf:params:xml:ns:caldav:param-filter':
472472 $subfilter = $v->GetContent();
473473 $parameter = $this->GetParameterValue($v->GetAttribute("name"));
474 if (is_array($parameter)) {
475 foreach ($parameter as $param) {
476 $match = $this->TestParamFilter($subfilter,$param);
477 // Early exit: OR match can stop if we have on success, AND match can stop if we have a fail
478 if ( $match != $matchAll ) return $match;
479 }
480 } else {
481 foreach (explode(',', $parameter) as $param) {
482 $match = $this->TestParamFilter($subfilter,$parameter);
483 // Early exit: OR match can stop if we have on success, AND match can stop if we have a fail
484 if ( $match != $matchAll ) return $match;
485 }
474
475 if (!isset($parameter)) {
476 $parameter = [ null ];
477 } elseif (!is_array($parameter)) {
478 $parameter = explode(',', $parameter);
486479 }
480
481 $match = false;
482 foreach ($parameter as $param) {
483 $match = $this->TestParamFilter($subfilter,$param);
484 if ($match) break;
485 }
486 // Early exit: OR match can stop if we have on success, AND match can stop if we have a fail
487 if ( $match != $matchAll ) return $match;
487488 break;
488489
489490 default: