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)
1  2 
tine20/Calendar/Setup/Update/Release8.php

@@@ -454,19 -239,21 +454,21 @@@ class Calendar_Setup_Update_Release8 ex
      /**
       * force activesync calendar resync for iOS devices
       */
 -    public function update_6()
 +    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);
+                 }
              }
          }