mirror of https://github.com/nextcloud/calendar
save current work state
This commit is contained in:
parent
e369c60393
commit
5d5d9adb48
|
@ -50,7 +50,7 @@ class Calendar extends Entity {
|
|||
$this->fromRow($createFrom);
|
||||
}
|
||||
|
||||
//create from vcalendar
|
||||
//create from VCalendar
|
||||
if($createFrom instanceof VCalendar) {
|
||||
$this->fromVObject($createFrom);
|
||||
}
|
||||
|
@ -122,11 +122,13 @@ class Calendar extends Entity {
|
|||
* @brief set uri property
|
||||
*/
|
||||
public function setURI($uri) {
|
||||
if(is_string($uri) === false) {
|
||||
if(is_string($uri) === false || trim($uri) === '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
$this->uri = $uri;
|
||||
parent::setUri($this->slugify('uri'));
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -287,6 +287,21 @@ class Object extends Entity {
|
|||
}
|
||||
}
|
||||
|
||||
public function getRuds($force=false) {
|
||||
if($this->ruds !== null) {
|
||||
return $this->ruds;
|
||||
} else {
|
||||
if($this->calendar instanceof Calendar) {
|
||||
$cruds = $this->calendar->getCruds();
|
||||
if($cruds & Permission::CREATE) {
|
||||
$cruds -= Permission::CREATE;
|
||||
}
|
||||
return $cruds;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get last modified of object
|
||||
* @return DateTime
|
||||
|
|
Loading…
Reference in New Issue