Merge branch '2013.10' into 2014.11
[tine20] / tine20 / Calendar / Frontend / ActiveSync.php
index b3a48f1..50075c7 100644 (file)
@@ -196,7 +196,14 @@ class Calendar_Frontend_ActiveSync extends ActiveSync_Frontend_Abstract implemen
         'samsunggtn7000', // Samsung Galaxy Note 
         'samsunggti9300', // Samsung Galaxy S-3
     );
-    
+
+    /**
+     * folder id which is currenttly synced
+     *
+     * @var string
+     */
+    protected $_syncFolderId = null;
+
     /**
      * (non-PHPdoc)
      * @see ActiveSync_Frontend_Abstract::__construct()
@@ -277,7 +284,7 @@ class Calendar_Frontend_ActiveSync extends ActiveSync_Frontend_Abstract implemen
                     
                 case 'attendee':
                     if ($this->_device->devicetype === Syncroton_Model_Device::TYPE_IPHONE &&
-                        $entry->container_id       !== $this->_getDefaultContainerId()) {
+                        $this->_syncFolderId       !== $this->_getDefaultContainerId()) {
                         
                         continue;
                     }
@@ -549,7 +556,7 @@ class Calendar_Frontend_ActiveSync extends ActiveSync_Frontend_Abstract implemen
                 } else {
                     if ($tine20Property === 'attendee' && $entry &&
                         $this->_device->devicetype === Syncroton_Model_Device::TYPE_IPHONE &&
-                        $entry->container_id       !== $this->_getDefaultContainerId()) {
+                        $this->_syncFolderId       !== $this->_getDefaultContainerId()) {
                             // keep attendees as the are / they were not sent to the device before
                     } else {
                         if (Tinebase_Core::isLogLevel(Zend_Log::TRACE)) Tinebase_Core::getLogger()->trace(
@@ -569,7 +576,7 @@ class Calendar_Frontend_ActiveSync extends ActiveSync_Frontend_Abstract implemen
                 case 'attendee':
                     if ($entry && 
                         $this->_device->devicetype === Syncroton_Model_Device::TYPE_IPHONE &&
-                        $entry->container_id       !== $this->_getDefaultContainerId()) {
+                        $this->_syncFolderId       !== $this->_getDefaultContainerId()) {
                             // keep attendees as the are / they were not sent to the device before
                             continue;
                     }
@@ -1037,6 +1044,8 @@ class Calendar_Frontend_ActiveSync extends ActiveSync_Frontend_Abstract implemen
             $containerId = Tinebase_Core::getPreference('ActiveSync')->{$this->_defaultFolder};
             $container = Tinebase_Container::getInstance()->getContainerById($containerId);
         }
+
+        $this->_syncFolderId = $container->getId();
         Calendar_Controller_MSEventFacade::getInstance()->assertEventFacadeParams($container, false);
     }
 }