From: Jan Schneider Date: Wed, 11 Aug 2010 14:29:01 +0000 (+0200) Subject: Use calendar-delegator-separator that can't appear in calendar URLs. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=7ad836e2cd26b14babece2b0339f55ba2fcfa754;p=horde.git Use calendar-delegator-separator that can't appear in calendar URLs. --- diff --git a/kronolith/add.php b/kronolith/add.php index 2073858cd..8c597fdbe 100644 --- a/kronolith/add.php +++ b/kronolith/add.php @@ -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(); diff --git a/kronolith/edit.php b/kronolith/edit.php index cf555a6f5..f3d480a9e 100644 --- a/kronolith/edit.php +++ b/kronolith/edit.php @@ -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(); diff --git a/kronolith/lib/Ajax/Application.php b/kronolith/lib/Ajax/Application.php index fc3e2dcd7..62cf4ef6c 100644 --- a/kronolith/lib/Ajax/Application.php +++ b/kronolith/lib/Ajax/Application.php @@ -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(); diff --git a/kronolith/lib/Event.php b/kronolith/lib/Event.php index a2c2e39d1..d8c88adeb 100644 --- a/kronolith/lib/Event.php +++ b/kronolith/lib/Event.php @@ -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(); } diff --git a/kronolith/templates/edit/edit.inc b/kronolith/templates/edit/edit.inc index 543cf9eb7..bf441a6a9 100644 --- a/kronolith/templates/edit/edit.inc +++ b/kronolith/templates/edit/edit.inc @@ -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"' : '';