Merge branch '2013.10' into 2014.11
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 25 Jan 2016 08:03:01 +0000 (09:03 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 25 Jan 2016 08:03:01 +0000 (09:03 +0100)
tine20/Calendar/Setup/Update/Release8.php

index 92bae4b..c392e43 100644 (file)
@@ -456,17 +456,19 @@ class Calendar_Setup_Update_Release8 extends Setup_Update_Abstract
      */
     public function update_10()
     {
-        $deviceBackend = new ActiveSync_Backend_Device();
-        $usersWithiPhones = $deviceBackend->search(new ActiveSync_Model_DeviceFilter(array(
-            'devicetype' => 'iphone'
-        )))->owner_id;
+        if (Tinebase_Application::getInstance()->isInstalled('ActiveSync')) {
+            $deviceBackend = new ActiveSync_Backend_Device();
+            $usersWithiPhones = $deviceBackend->search(new ActiveSync_Model_DeviceFilter(array(
+                'devicetype' => 'iphone'
+            )))->owner_id;
 
-        $activeSyncController = ActiveSync_Controller::getInstance();
-        foreach($usersWithiPhones as $userId) {
-            try {
-                $activeSyncController->resetSyncForUser($userId, 'Calendar');
-            } catch (Exception $e) {
-                Tinebase_Exception::log($e, /* suppress trace */ false);
+            $activeSyncController = ActiveSync_Controller::getInstance();
+            foreach ($usersWithiPhones as $userId) {
+                try {
+                    $activeSyncController->resetSyncForUser($userId, 'Calendar');
+                } catch (Exception $e) {
+                    Tinebase_Exception::log($e, /* suppress trace */ false);
+                }
             }
         }