renamed shared
authorLars Kneschke <l.kneschke@metaways.de>
Wed, 30 Apr 2014 05:24:37 +0000 (07:24 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Thu, 4 Sep 2014 09:26:35 +0000 (11:26 +0200)
Change-Id: I7df709ee59088dcada8c6259b926eca4d3e67d0b
Reviewed-on: http://gerrit.tine20.com/customers/584
Reviewed-by: Lars Kneschke <l.kneschke@metaways.de>
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Addressbook/Frontend/WebDAV/Container.php
tine20/Calendar/Frontend/WebDAV/Container.php
tine20/Tasks/Frontend/WebDAV/Container.php
tine20/Tinebase/WebDav/PrincipalBackend.php

index 1ac7116..d360d17 100644 (file)
@@ -35,8 +35,6 @@ class Addressbook_Frontend_WebDAV_Container extends Tinebase_WebDav_Container_Ab
      */
     public function getProperties($requestedProperties) 
     {
-        $displayName = $this->_container->type == Tinebase_Model_Container::TYPE_SHARED ? $this->_container->name . ' (shared)' : $this->_container->name;
-        
         $ctags = Tinebase_Container::getInstance()->getContentSequence($this->_container);
         
         $properties = array(
@@ -45,10 +43,10 @@ class Addressbook_Frontend_WebDAV_Container extends Tinebase_WebDav_Container_Ab
             'uri'                                    => $this->_useIdAsName == true ? $this->_container->getId() : $this->_container->name,
             '{DAV:}resource-id'                      => 'urn:uuid:' . $this->_container->getId(),
             '{DAV:}owner'                            => new DAVACL\Property\Principal(DAVACL\Property\Principal::HREF, 'principals/users/' . Tinebase_Core::getUser()->contact_id),
-            '{DAV:}displayname'                      => $displayName,
+            '{DAV:}displayname'                      => $this->_container->name,
          
             #'principaluri'      => $principalUri,
-            '{' . CardDAV\Plugin::NS_CARDDAV . '}addressbook-description'    => 'Addressbook ' . $displayName,
+            '{' . CardDAV\Plugin::NS_CARDDAV . '}addressbook-description'    => 'Addressbook ' . $this->_container->name,
             '{' . CardDAV\Plugin::NS_CARDDAV . '}supported-addressbook-data' => new CardDAV\Property\SupportedAddressData(array(array('contentType' => 'text/vcard', 'version' => '3.0')))
         );
         
index 43ea49b..8dd919b 100644 (file)
@@ -132,8 +132,6 @@ class Calendar_Frontend_WebDAV_Container extends Tinebase_WebDav_Container_Abstr
      */
     public function getProperties($requestedProperties) 
     {
-        $displayName = $this->_container->type == Tinebase_Model_Container::TYPE_SHARED ? $this->_container->name . ' (shared)' : $this->_container->name;
-        
         $ctags = Tinebase_Container::getInstance()->getContentSequence($this->_container);
         
         $properties = array(
@@ -142,12 +140,12 @@ class Calendar_Frontend_WebDAV_Container extends Tinebase_WebDav_Container_Abstr
             'uri'               => $this->_useIdAsName == true ? $this->_container->getId() : $this->_container->name,
             '{DAV:}resource-id' => 'urn:uuid:' . $this->_container->getId(),
             '{DAV:}owner'       => new Sabre\DAVACL\Property\Principal(Sabre\DAVACL\Property\Principal::HREF, 'principals/users/' . Tinebase_Core::getUser()->contact_id),
-            '{DAV:}displayname' => $displayName,
+            '{DAV:}displayname' => $this->_container->name,
             '{http://apple.com/ns/ical/}calendar-color' => (empty($this->_container->color)) ? '#000000' : $this->_container->color,
             
             '{' . Sabre\CalDAV\Plugin::NS_CALDAV . '}supported-calendar-component-set' => new Sabre\CalDAV\Property\SupportedCalendarComponentSet(array('VEVENT')),
             '{' . Sabre\CalDAV\Plugin::NS_CALDAV . '}supported-calendar-data'          => new Sabre\CalDAV\Property\SupportedCalendarData(),
-            '{' . Sabre\CalDAV\Plugin::NS_CALDAV . '}calendar-description'             => 'Calendar ' . $displayName,
+            '{' . Sabre\CalDAV\Plugin::NS_CALDAV . '}calendar-description'             => 'Calendar ' . $this->_container->name,
             '{' . Sabre\CalDAV\Plugin::NS_CALDAV . '}calendar-timezone'                => Tinebase_WebDav_Container_Abstract::getCalendarVTimezone($this->_application)
         );
         
index d8b34f8..cd03ad4 100644 (file)
@@ -185,8 +185,6 @@ class Tasks_Frontend_WebDAV_Container extends Tinebase_WebDav_Container_Abstract
      */
     public function getProperties($requestedProperties) 
     {
-        $displayName = $this->_container->type == Tinebase_Model_Container::TYPE_SHARED ? $this->_container->name . ' (shared)' : $this->_container->name;
-        
         $ctags = Tinebase_Container::getInstance()->getContentSequence($this->_container);
         
         $properties = array(
@@ -195,12 +193,12 @@ class Tasks_Frontend_WebDAV_Container extends Tinebase_WebDav_Container_Abstract
             'uri'               => $this->_useIdAsName == true ? $this->_container->getId() : $this->_container->name,
             '{DAV:}resource-id'        => 'urn:uuid:' . $this->_container->getId(),
             '{DAV:}owner'       => new \Sabre\DAVACL\Property\Principal(\Sabre\DAVACL\Property\Principal::HREF, 'principals/users/' . Tinebase_Core::getUser()->contact_id),
-            '{DAV:}displayname' => $displayName,
+            '{DAV:}displayname' => $this->_container->name,
             '{http://apple.com/ns/ical/}calendar-color' => (empty($this->_container->color)) ? '#000000' : $this->_container->color,
             
             '{' . \Sabre\CalDAV\Plugin::NS_CALDAV . '}supported-calendar-component-set' => new \Sabre\CalDAV\Property\SupportedCalendarComponentSet(array('VTODO')),
             '{' . \Sabre\CalDAV\Plugin::NS_CALDAV . '}supported-calendar-data'          => new \Sabre\CalDAV\Property\SupportedCalendarData(),
-            '{' . \Sabre\CalDAV\Plugin::NS_CALDAV . '}calendar-description'             => 'Tasks ' . $displayName,
+            '{' . \Sabre\CalDAV\Plugin::NS_CALDAV . '}calendar-description'             => 'Tasks ' . $this->_container->name,
             '{' . \Sabre\CalDAV\Plugin::NS_CALDAV . '}calendar-timezone'                => Tinebase_WebDav_Container_Abstract::getCalendarVTimezone($this->_application)
         );
         
index 07795c3..3ba9250 100644 (file)
@@ -497,9 +497,11 @@ class Tinebase_WebDav_PrincipalBackend implements \Sabre\DAVACL\PrincipalBackend
      */
     protected function _contactForSharedPrincipal()
     {
+        $translate = Tinebase_Translation::getTranslation('Tinebase');
+        
         $principal = array(
             'uri'                     => self::PREFIX_USERS . '/' . self::SHARED,
-            '{DAV:}displayname'       => 'Principal for shared folders',
+            '{DAV:}displayname'       => $translate->_('Shared folders'),
             
             '{' . \Sabre\CalDAV\Plugin::NS_CALDAV . '}calendar-user-type'  => 'INDIVIDUAL',