芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/public_html/cloud.pulsehost.co.uk/modules/Calendar/Classes/Calendar.php
Id = rtrim(urldecode($sId), '/'); $this->IntId = 0; $this->IsDefault = (\substr($this->Id, 0, \strlen(\Afterlogic\DAV\Constants::CALENDAR_DEFAULT_UUID)) === \Afterlogic\DAV\Constants::CALENDAR_DEFAULT_UUID); $this->DisplayName = $sDisplayName; $this->CTag = $sCTag; $this->ETag = $sETag; $this->Description = $sDescription; $this->Color = $sColor; $this->Order = $sOrder; $this->Shared = false; $this->SharedToAll = false; $this->SharedToAllAccess = \Aurora\Modules\Calendar\Enums\Permission::Read; $this->Owner = ''; $this->Principals = array(); $this->Access = \Aurora\Modules\Calendar\Enums\Permission::Write; $this->Shares = array(); $this->IsPublic = false; $this->PubHash = null; $this->SyncToken = null; $this->Subscribed = false; $this->Source = ''; } /** * @return string */ public function GetMainPrincipalUrl() { $sResult = ''; if (is_array($this->Principals) && count($this->Principals) > 0) { $sResult = str_replace('/calendar-proxy-read', '', rtrim($this->Principals[0], '/')); $sResult = str_replace('/calendar-proxy-write', '', $sResult); } return $sResult; } /** * @deprecated since version 9.7.6 * @param mixed $oAccount * @return bool */ public function IsCalendarOwner($oAccount) { return ($oAccount === $this->Owner); } public function toResponseArray($aParameters = array()) { return array( 'Id' => $this->Id, 'Url' => $this->Url, 'ExportHash' => \Aurora\System\Api::EncodeKeyValues(array('CalendarId' => $this->Id)), 'Color' => $this->Color, 'Description' => $this->Description, 'Name' => $this->DisplayName, 'Owner' => $this->Owner, 'IsDefault' => $this->IsDefault, 'PrincipalId' => $this->GetMainPrincipalUrl(), 'Shared' => $this->Shared, 'SharedToAll' => $this->SharedToAll, 'SharedToAllAccess' => $this->SharedToAllAccess, 'Access' => $this->Access, 'IsPublic' => $this->IsPublic, 'PubHash' => $this->PubHash, 'Shares' => $this->Shares, 'CTag' => $this->CTag, 'Etag' => $this->ETag, 'SyncToken' => $this->SyncToken, 'Subscribed' => $this->Subscribed, 'Source' => $this->Source ); } }