mirror of
https://codeberg.org/icewind/SearchDAV.git
synced 2026-06-03 17:44:06 +02:00
"where" is optional
This commit is contained in:
parent
e8cf5e7644
commit
aeb7610589
3 changed files with 15 additions and 11 deletions
|
|
@ -62,11 +62,6 @@ class SearchHandler {
|
|||
}
|
||||
/** @var BasicSearch $query */
|
||||
$query = $xml['{DAV:}basicsearch'];
|
||||
if (!$query->where) {
|
||||
$response->setStatus(400);
|
||||
$response->setBody('Parse error: Missing {DAV:}where from {DAV:}basicsearch');
|
||||
return false;
|
||||
}
|
||||
if (!$query->select) {
|
||||
$response->setStatus(400);
|
||||
$response->setBody('Parse error: Missing {DAV:}select from {DAV:}basicsearch');
|
||||
|
|
@ -123,7 +118,7 @@ class SearchHandler {
|
|||
}, $xml->select);
|
||||
$select = array_filter($select);
|
||||
|
||||
$where = $this->transformOperator($xml->where, $allProps);
|
||||
$where = $xml->where ? $this->transformOperator($xml->where, $allProps) : null;
|
||||
|
||||
return new Query($select, $xml->from, $where, $orderBy, $xml->limit);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue