• Модуль: webdav
  • Путь к файлу: ~/bitrix/modules/webdav/classes/editdoccomponentbase.php
  • Класс: CWebDavEditDocComponentBase
  • Вызов: CWebDavEditDocComponentBase::removeFile
protected function removeFile(array $onlineEditor = array())
{
	if(!empty($onlineEditor['OWNER_ID']) && $onlineEditor['OWNER_ID'] != $this->getUser()->getId())
	{
		$accessTokenByCurrentUser = $this->getAccessToken();

		$oAuthUrl = CUtil::JSEscape($this->getOAuthUrlBySocServ());
		$accessTokenByOwnerDoc = $this->getAccessTokenByUserSocServ($onlineEditor['OWNER_ID']);
		$this
			->getDocHandler()
				->setAccessToken($accessTokenByOwnerDoc)
		;
	}

	//todo check permissions. Can we delete alien file?
	//empty result. Last session - delete doc from google docs
	$a = $this
		->getDocHandler()
			->removeFile(array('id' => $this->getFileId()))
	;
	//restore access token by current user
	if(!empty($accessTokenByOwnerDoc))
	{
		$this
			->getDocHandler()
				->setAccessToken($accessTokenByCurrentUser)
		;
	}
}