Merge branch '2013.10' into 2014.11
authorPhilipp Schüle <p.schuele@metaways.de>
Fri, 4 Sep 2015 10:38:16 +0000 (12:38 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Fri, 4 Sep 2015 10:38:16 +0000 (12:38 +0200)
Change-Id: Ie92d7093c90f3fd7397e78abe429328a5216e7eb

1  2 
tine20/Addressbook/Convert/Contact/VCard/Abstract.php

@@@ -140,7 -140,7 +140,7 @@@ abstract class Addressbook_Convert_Cont
                      $parts = $property->getParts();
                      
                      $data['n_family'] = $parts[0];
-                     $data['n_given']  = $parts[1];
+                     $data['n_given']  = isset($parts[1]) ? $parts[1] : null;
                      $data['n_middle'] = isset($parts[2]) ? $parts[2] : null;
                      $data['n_prefix'] = isset($parts[3]) ? $parts[3] : null;
                      $data['n_suffix'] = isset($parts[4]) ? $parts[4] : null;
       */
      protected function _toTine20ModelParseBday(&$data, \Sabre\VObject\Property $property)
      {
 -        $tzone = new DateTimeZone(Tinebase_Core::get(Tinebase_Core::USERTIMEZONE));
 +        $tzone = new DateTimeZone(Tinebase_Core::getUserTimezone());
          $data['bday'] = new Tinebase_DateTime($property->getValue(), $tzone);
          $data['bday']->setTimezone(new DateTimeZone('UTC'));
      }
      {
          if ($record->bday instanceof Tinebase_DateTime) {
              $date = clone $record->bday;
 -            $date->setTimezone(Tinebase_Core::get(Tinebase_Core::USERTIMEZONE));
 +            $date->setTimezone(Tinebase_Core::getUserTimezone());
              $date = $date->format('Y-m-d');
              $card->add('BDAY', $date);
          }