Add user name of shared calendars as suffix. We sort by calendar name anyway.
authorJan Schneider <jan@horde.org>
Tue, 7 Dec 2010 20:25:30 +0000 (21:25 +0100)
committerJan Schneider <jan@horde.org>
Tue, 7 Dec 2010 21:04:24 +0000 (22:04 +0100)
kronolith/lib/Calendar/External/Tasks.php
kronolith/lib/Calendar/Internal.php

index 42b8e9b..adbd88a 100644 (file)
@@ -30,8 +30,8 @@ class Kronolith_Calendar_External_Tasks extends Kronolith_Calendar_External
             $this->_share->get('owner') == $GLOBALS['registry']->getAuth();
 
         $hash = parent::toHash();
-        $hash['name']  = ($owner || !$this->_share->get('owner') ? '' : '[' . $GLOBALS['registry']->convertUsername($this->_share->get('owner'), false) . '] ')
-            . $this->_share->get('name');
+        $hash['name']  = $this->_share->get('name')
+          . ($owner || !$this->_share->get('owner') ? '' : ' [' . $GLOBALS['registry']->convertUsername($this->_share->get('owner'), false) . ']');
         $hash['desc']  = $this->_share->get('desc');
         $hash['owner'] = $owner;
         $hash['fg']    = Kronolith::foregroundColor($this->_share);
index 488d68f..1997c37 100644 (file)
@@ -133,8 +133,8 @@ class Kronolith_Calendar_Internal extends Kronolith_Calendar
             $this->owner() == $GLOBALS['registry']->getAuth();
 
         $hash = parent::toHash();
-        $hash['name']  = ($owner || !$this->owner() ? '' : '[' . $GLOBALS['registry']->convertUsername($this->owner(), false) . '] ')
-            . $this->name();
+        $hash['name']  = $this->name()
+          . ($owner || !$this->owner() ? '' : ' [' . $GLOBALS['registry']->convertUsername($this->owner(), false) . ']');
         $hash['owner'] = $owner;
         $hash['show']  = in_array($id, $GLOBALS['display_calendars']);
         $hash['edit']  = $this->hasPermission(Horde_Perms::EDIT);