Пример #1
0
 /**
  * If this is a resource of the current user ignore ACL permissions when deleting 
  */
 public function delete($ignoreAcl = false)
 {
     if (!empty($this->resource_event_id) && $this->user_id == \GO::user()->id) {
         $success = parent::delete(true);
     } else {
         $success = parent::delete($ignoreAcl);
     }
     if ($success) {
         Calendar::versionUp($this->calendar_id);
     }
     return $success;
 }
Пример #2
0
 public function delete($ignoreAcl = false)
 {
     if (!$ignoreAcl && $this->readonly) {
         throw new \Exception(\GO::t('dontDeleteSystemFolder', 'files'));
     }
     return parent::delete($ignoreAcl);
 }