Enforce a trailling '/' on collections when they are created.

This commit is contained in:
Andrew McMillan 2007-11-06 17:29:22 +13:00
parent a37a68b8ca
commit d99f8ccc35

View File

@ -15,6 +15,10 @@ if ( ! $request->AllowedTo('mkcalendar') ) {
}
$displayname = $request->path;
// Enforce trailling '/' on collection name
if ( ! preg_match( '#/$#', $request->path ) ) $request->path .= '/';
$parent_container = '/';
if ( preg_match( '#^(.*/)([^/]+)(/)?$#', $request->path, $matches ) ) {
$parent_container = $matches[1];