- Модуль: webdav
- Путь к файлу: ~/bitrix/modules/webdav/classes/general.php
- Класс: CWebDavBase
- Вызов: CWebDavBase::SetPath
function SetPath($path)
{
$this->_path = (mb_substr($path, -9, 9) === "index.php"? mb_substr($path, 0, mb_strlen($path) - 9) : $path);
if (
defined('BX_UTF')
&& isset($_SERVER['SERVER_SOFTWARE'])
&& (mb_strpos($_SERVER['SERVER_SOFTWARE'], 'IIS') !== false)
&& ! CUtil::DetectUTF8($_SERVER["REQUEST_URI"])
)
{
$charset = 'windows-1251';
if (
defined('BX_DEFAULT_CHARSET')
&& ( 'BX_DEFAULT_CHARSET' <> '' )
)
$charset = BX_DEFAULT_CHARSET;
$this->_path = CharsetConverter::ConvertCharset($this->_path, $charset, "utf-8");
}
$arPath = explode('/',$this->_udecode($this->_path));
foreach ($this->meta_names as $metaName => $metaValue)
{
if ($arPath[1] == $metaValue['alias'] || $arPath[1] == $metaValue['name'])
$this->meta_state = $metaName;
}
if (isset($this->meta_state) && method_exists($this, 'GetMetaID'))
$this->GetMetaID($this->meta_state);
}