Use calendar-delegator-separator that can't appear in calendar URLs.
authorJan Schneider <jan@horde.org>
Wed, 11 Aug 2010 14:29:01 +0000 (16:29 +0200)
committerJan Schneider <jan@horde.org>
Wed, 11 Aug 2010 15:34:56 +0000 (17:34 +0200)
kronolith/add.php
kronolith/edit.php
kronolith/lib/Ajax/Application.php
kronolith/lib/Event.php
kronolith/templates/edit/edit.inc

index 2073858..8c597fd 100644 (file)
@@ -19,8 +19,8 @@ do {
     }
 
     list($targetType, $targetcalendar) = explode('_', Horde_Util::getFormData('targetcalendar'), 2);
-    if (strpos($targetcalendar, ':')) {
-        list($calendar_id, $user) = explode(':', $targetcalendar, 2);
+    if (strpos($targetcalendar, '\\')) {
+        list($calendar_id, $user) = explode('\\', $targetcalendar, 2);
     } else {
         $calendar_id = $targetcalendar;
         $user = $GLOBALS['registry']->getAuth();
index cf555a6..f3d480a 100644 (file)
@@ -83,8 +83,8 @@ do {
 
     list($sourceType, $source) = explode('_', Horde_Util::getFormData('existingcalendar'), 2);
     list($targetType, $targetcalendar) = explode('_', Horde_Util::getFormData('targetcalendar'), 2);
-    if (strpos($targetcalendar, ':')) {
-        list($target, $user) = explode(':', $targetcalendar, 2);
+    if (strpos($targetcalendar, '\\')) {
+        list($target, $user) = explode('\\', $targetcalendar, 2);
     } else {
         $target = $targetcalendar;
         $user = $GLOBALS['registry']->getAuth();
index fc3e2dc..62cf4ef 100644 (file)
@@ -110,8 +110,8 @@ class Kronolith_Ajax_Application extends Horde_Core_Ajax_Application
         if ($this->_vars->event &&
             $this->_vars->cal &&
             $this->_vars->cal != $this->_vars->targetcalendar) {
-            if (strpos($kronolith_driver->calendar, ':')) {
-                list($target, $user) = explode(':', $kronolith_driver->calendar, 2);
+            if (strpos($kronolith_driver->calendar, '\\')) {
+                list($target, $user) = explode('\\', $kronolith_driver->calendar, 2);
             } else {
                 $target = $kronolith_driver->calendar;
                 $user = $GLOBALS['registry']->getAuth();
index a2c2e39..d8c88ad 100644 (file)
@@ -1988,8 +1988,8 @@ abstract class Kronolith_Event
 
         // Event owner.
         $targetcalendar = Horde_Util::getFormData('targetcalendar');
-        if (strpos($targetcalendar, ':')) {
-            list(, $this->creator) = explode(':', $targetcalendar, 2);
+        if (strpos($targetcalendar, '\\')) {
+            list(, $this->creator) = explode('\\', $targetcalendar, 2);
         } elseif (!isset($this->id)) {
             $this->creator = $GLOBALS['registry']->getAuth();
         }
index 543cf9e..bf441a6 100644 (file)
@@ -87,7 +87,7 @@ $hide_img = Horde::img('minus.png', _("Hide"), 'style="display:none"');
             if ($cal->hasPermission(Horde_Perms::EDIT)) {
                 $delegates[$id] = htmlspecialchars($cal->name());
             } else {
-                $delegates[$id . ':' . $cal->owner()] = htmlspecialchars($cal->name(). ' (' . sprintf(_("as %s"), Kronolith::getUserName($cal->owner())) . ')');
+                $delegates[$cal->owner() . '\\' . $id] = htmlspecialchars($cal->name(). ' (' . sprintf(_("as %s"), Kronolith::getUserName($cal->owner())) . ')');
             }
             foreach ($delegates as $delegate_id => $cal_name) {
                 $sel = ($delegate_id == $calendar_id) ? ' selected="selected"' : '';