summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Kolab/Utils/DAVBackend.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Kolab/Utils/DAVBackend.php b/lib/Kolab/Utils/DAVBackend.php
index cf165b7..04aa80f 100644
--- a/lib/Kolab/Utils/DAVBackend.php
+++ b/lib/Kolab/Utils/DAVBackend.php
@@ -233,7 +233,7 @@ class DAVBackend
{
$props = array(
'type' => $type,
- 'name' => 'Untitled',
+ 'name' => '',
'subscribed' => true,
);
@@ -255,6 +255,12 @@ class DAVBackend
}
}
+ // use UID as name if it doesn't seem to be a real UID
+ // TODO: append number to default "Untitled" folder name if one already exists
+ if (empty($props['name'])) {
+ $props['name'] = strlen($uid) < 16 ? $uid : 'Untitled';
+ }
+
if (!($fname = kolab_storage::folder_update($props))) {
rcube::raise_error(array(
'code' => 600, 'type' => 'php',