- Модуль: webdav
- Путь к файлу: ~/bitrix/modules/webdav/classes/file.php
- Класс: CWebDavFile
- Вызов: CWebDavFile::__construct
public function __construct($arParams, $base_url)
{
$io = self::GetIo();
$arParams = (is_array($arParams) ? $arParams : array());
$this->RegisterVirtualIOCompatibility();
$arParams["FOLDER"] = $io->CombinePath("/", trim($arParams["FOLDER"]));
$this->real_path = $arParams["FOLDER"];
$this->real_path_full = $io->CombinePath($_SERVER['DOCUMENT_ROOT'], $arParams["FOLDER"]);
parent::__construct($base_url);
if (! $io->DirectoryExists($this->real_path_full))
{
$this->arError[] = array(
"id" => "folder is not exists",
"text" => GetMessage("WD_FILE_ERROR1"));
}
elseif (mb_substr($this->real_path, 0, 7) == "/bitrix")
{
$this->arError[] = array(
"id" => "forbidden folder",
"text" => GetMessage("WD_FILE_ERROR15"));
}
$this->permission = $GLOBALS['APPLICATION']->GetFileAccessPermission($arParams["FOLDER"]);
foreach ($this->arFilePermissions as $right => $permissionOuter)
{
foreach ($this->arFilePermissions[$right] as $ext => $perms)
{
if ($this->permission < $perms)
{
$this->arFileForbiddenExtentions[$right][] = $ext;
}
}
}
if (!$GLOBALS["USER"]->IsAdmin())
{
$res = GetScriptFileExt();
foreach ($res as $ext)
{
$this->arFileForbiddenExtentions["WRITE"][] = ".".$ext;
}
}
$this->workflow = false;
}