mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-30 03:24:47 +00:00
When matching a URL and we have something without a trailing slash, it could also be a binding.
This commit is contained in:
parent
0d2ef3475d
commit
58fe06586e
@ -429,7 +429,7 @@ FROM dav_binding
|
|||||||
EOSQL;
|
EOSQL;
|
||||||
$params = array( ':raw_path' => $this->dav_name, ':session_principal' => $session->principal_id, ':scan_depth' => $c->permission_scan_depth );
|
$params = array( ':raw_path' => $this->dav_name, ':session_principal' => $session->principal_id, ':scan_depth' => $c->permission_scan_depth );
|
||||||
if ( !preg_match( '#/$#', $this->dav_name ) ) {
|
if ( !preg_match( '#/$#', $this->dav_name ) ) {
|
||||||
$sql .= ' OR dav_binding.dav_name = :up_to_slash OR collection.dav_name = :plus_slash ';
|
$sql .= ' OR dav_binding.dav_name = :up_to_slash OR collection.dav_name = :plus_slash OR dav_binding.dav_name = :plus_slash ';
|
||||||
$params[':up_to_slash'] = preg_replace( '#[^/]*$#', '', $this->dav_name);
|
$params[':up_to_slash'] = preg_replace( '#[^/]*$#', '', $this->dav_name);
|
||||||
$params[':plus_slash'] = $this->dav_name.'/';
|
$params[':plus_slash'] = $this->dav_name.'/';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user