Skip to content

Commit

Permalink
Merge branch '3.3' of github.com:fruux/sabre-vobject into 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
evert committed Jan 6, 2015
2 parents 684ae8a + 3b188e2 commit d563f55
Show file tree
Hide file tree
Showing 71 changed files with 135 additions and 97 deletions.
23 changes: 17 additions & 6 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
ChangeLog
=========

3.3.5 (2014-??-??)
------------------

* #168: Expanding calendars now removes objects with recurrence rules that
don't have a valid recurrence instance.


3.3.4 (2014-11-19)
------------------

Expand Down Expand Up @@ -33,6 +40,7 @@ ChangeLog
* Support for "Line Islands Standard Time" windows timezone.
* #154: Correctly work around vCard parameters that have a value but no name.


3.3.2 (2014-09-19)
------------------

Expand All @@ -54,6 +62,7 @@ ChangeLog
declined earlier will no longer generate another reply.
* #125: Send CANCEL messages when ORGANIZER property gets deleted.


3.3.1 (2014-08-18)
------------------

Expand Down Expand Up @@ -119,6 +128,7 @@ ChangeLog

3.2.1 (2014-05-03)
------------------

* Minor tweak to make the unittests run with the latest hhvm on travis.
* Updated timezone definitions.
* Updated copyright links to point to http://sabre.io/
Expand Down Expand Up @@ -152,14 +162,9 @@ ChangeLog
disabled and an invalid file is read.


3.1.5 (2014-??-??)
------------------
* Updated: Some docblocks and other documentation. Made the unittests succeed
on recent php versions.


3.1.4 (2014-03-30)
------------------

* Fixed: Issue #87: Several compatibility fixes related to timezone handling
changes in PHP 5.5.10.

Expand Down Expand Up @@ -342,6 +347,12 @@ ChangeLog
add() method.


2.1.6 (2014-12-10)
------------------

* Fixed: Minor change to make sure that unittests succeed on every PHP version.


2.1.5 (2014-06-03)
------------------

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (C) 2007-2014 fruux GmbH (https://fruux.com/)
Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/)

All rights reserved.

Expand Down
2 changes: 1 addition & 1 deletion lib/Cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/**
* This is the CLI interface for sabre-vobject.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH. All rights reserved.
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* A component represents a group of properties, such as VCALENDAR, VEVENT, or
* VCARD.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH. All rights reserved.
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Component/VAlarm.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*
* This component contains some additional functionality specific for VALARMs.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH (https://fruux.com/).
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
16 changes: 14 additions & 2 deletions lib/Component/VCalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
use Sabre\VObject;
use Sabre\VObject\Component;
use Sabre\VObject\Recur\EventIterator;
use Sabre\VObject\Recur\NoInstancesException;

/**
* The VCalendar component
*
* This component adds functionality to a component, specific for a VCALENDAR.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH (https://fruux.com/).
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down Expand Up @@ -268,12 +269,22 @@ public function expand(DateTime $start, DateTime $end, DateTimeZone $timeZone =
continue;
}



$uid = (string)$vevent->uid;
if (!$uid) {
throw new \LogicException('Event did not have a UID!');
}

$it = new EventIterator($this, $vevent->uid, $timeZone);
try {
$it = new EventIterator($this, $vevent->uid, $timeZone);
} catch (NoInstancesException $e) {
// This event is recurring, but it doesn't have a single
// instance. We are skipping this event from the output
// entirely.
unset($this->children[$key]);
continue;
}
$it->fastForward($start);

while($it->valid() && $it->getDTStart() < $end) {
Expand All @@ -286,6 +297,7 @@ public function expand(DateTime $start, DateTime $end, DateTimeZone $timeZone =
$it->next();

}

unset($this->children[$key]);

}
Expand Down
11 changes: 10 additions & 1 deletion lib/Component/VCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* This component represents the BEGIN:VCARD and END:VCARD found in every
* vcard.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH (https://fruux.com/).
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down Expand Up @@ -229,6 +229,15 @@ public function validate($options = 0) {
}

}
$uid = $this->select('UID');
if (($options & self::REPAIR) && count($uid) === 0) {
$this->UID = VObject\UUIDUtil::getUUID();
$warnings[] = array(
'level' => 1,
'message' => 'The UID property must appear in the VCARD component exactly 1 time',
'node' => $this,
);
}
$fn = $this->select('FN');
if (count($fn)!==1) {

Expand Down
2 changes: 1 addition & 1 deletion lib/Component/VEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* This component contains some additional functionality specific for VEVENT's.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH (https://fruux.com/).
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Component/VFreeBusy.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* This component adds functionality to a component, specific for VFREEBUSY
* components.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH (https://fruux.com/).
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Component/VJournal.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* This component contains some additional functionality specific for VJOURNALs.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH (https://fruux.com/).
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Component/VTimeZone.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* This component adds functionality to a component, specific for VTIMEZONE
* components.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH (https://fruux.com/).
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Component/VTodo.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* This component contains some additional functionality specific for VTODOs.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH (https://fruux.com/).
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/DateTimeParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* This class is responsible for parsing the several different date and time
* formats iCalendar and vCards have.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH (https://fruux.com/).
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* This class also provides a registry for document types.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH. All rights reserved.
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/ElementList.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* This class represents a list of elements. Lists are the result of queries,
* such as doing $vcalendar->vevent where there's multiple VEVENT objects.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH (https://fruux.com/).
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/EofException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Exception thrown by parser when the end of the stream has been reached,
* before this was expected.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH (https://fruux.com/).
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/FreeBusyGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* VFREEBUSY components are described in RFC5545, The rules for what should
* go in a single freebusy report is taken from RFC4791, section 7.10.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH (https://fruux.com/).
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/ITip/Broker.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* 6. It can process a reply from an invite and update an events attendee
* status based on a reply.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH. All rights reserved.
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/ITip/ITipException.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* This message is emitted in case of serious problems with iTip messages.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH. All rights reserved.
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/ITip/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* It should for the most part be treated as immutable.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH. All rights reserved.
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/ITip/SameOrganizerForAllComponentsException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* component (e.g.: exceptions), but the organizer is not identical in every
* component.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH. All rights reserved.
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/**
* A node is the root class for every element in an iCalendar of vCard object.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH. All rights reserved.
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Parameter.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* DTSTART;VALUE=DATE:20101108
* VALUE=DATE would be the parameter name and value.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH (https://fruux.com/).
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/ParseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/**
* Exception thrown by Reader if an invalid object was attempted to be parsed.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH (https://fruux.com/).
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Parser/Json.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* This parser parses both the jCal and jCard formats.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH. All rights reserved.
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Parser/MimeDir.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Sabre\VObject\Component\VCalendar
* Sabre\VObject\Component\VCard
*
* @copyright Copyright (C) 2007-2014 fruux GmbH. All rights reserved.
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Parser/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* This class serves as a base-class for the different parsers.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH. All rights reserved.
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Property.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* A property is always in a KEY:VALUE structure, and may optionally contain
* parameters.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH. All rights reserved.
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Property/Binary.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* This property will transparently encode and decode to base64.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH. All rights reserved.
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Property/Boolean.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* Automatic conversion to PHP's true and false are done.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH. All rights reserved.
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Property/FlatText.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* vCard 4.0 states something similar. An unescaped semi-colon _may_ be a
* delimiter, depending on the property.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH. All rights reserved.
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Property/Float.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* This object represents FLOAT values. These can be 1 or more floating-point
* numbers.
*
* @copyright Copyright (C) 2007-2014 fruux GmbH. All rights reserved.
* @copyright Copyright (C) 2011-2015 fruux GmbH (https://fruux.com/).
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
Expand Down
Loading

0 comments on commit d563f55

Please sign in to comment.