- Модуль: webdav
- Путь к файлу: ~/bitrix/modules/webdav/classes/file.php
- Класс: CWebDavFile
- Вызов: CWebDavFile::Reindex
function Reindex($file)
{
$io = self::GetIo();
if (CModule::IncludeModule('search'))
{
$path = $file;
if (mb_strpos($file, $this->real_path_full) !== false)
{
$path = mb_substr($file, mb_strlen($this->real_path_full) + 1);
}
$path = $io->CombinePath($this->real_path, $path);
$url = $this->base_url.mb_substr($file, mb_strlen($this->real_path_full));
if (mb_strpos(mb_strtolower(PHP_OS), 'win') !== false)
usleep(1000); // pass thru windows write cache
clearstatcache();
$searchID = CSearch::ReIndexFile(Array(SITE_ID, $path));
if (intval($searchID) > 0)
{
CSearch::Update($searchID, array('URL' => $url));
}
}
}