kopia lustrzana https://github.com/friendica/SG-iCalendar
Changed VEvent.isConfirmed to return VEvent.DEFAULT_CONFIRMED when no status is defined. This is because alot of calendars doesn't have the status field, and returning false isn't always what's wanted.
No sure what the RFC says, couldn't find the default value for STATUSmaster
rodzic
87bf23b6d0
commit
db3e10f5a2
|
@ -14,6 +14,7 @@
|
|||
* @license http://creativecommons.org/licenses/by-sa/2.5/dk/deed.en_GB CC-BY-SA-DK
|
||||
*/
|
||||
class SG_iCal_VEvent {
|
||||
const DEFAULT_CONFIRMED = true;
|
||||
private $uid;
|
||||
private $start;
|
||||
private $end;
|
||||
|
@ -103,7 +104,11 @@ class SG_iCal_VEvent {
|
|||
* @return bool
|
||||
*/
|
||||
public function isConfirmed() {
|
||||
return (isset($this->data['status']) && $this->data['status'] == 'CONFIRMED');
|
||||
if( !isset($this->data['status']) ) {
|
||||
return self::DEFAULT_CONFIRMED;
|
||||
} else {
|
||||
return $this->data['status'] == 'CONFIRMED';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Ładowanie…
Reference in New Issue