• Модуль: security
  • Путь к файлу: ~/bitrix/modules/security/lib/controller/xscan.php
  • Класс: BitrixSecurityControllerXscan
  • Вызов: Xscan::releaseAction
public function releaseAction(string $file)
{
	$file = '/' . trim($file, '/');

	if (!$file || !file_exists($file))
	{
		$msg = CBitrixXscan::ShowMsg(Loc::getMessage("BITRIX_XSCAN_FILE_NOT_FOUND") . htmlspecialcharsbx($file),
			'red');
	}
	else
	{
		$new_f = preg_replace('#.ph_$#', '.php', $file);
		if (rename($file, $new_f))
		{
			$msg = CBitrixXscan::ShowMsg(Loc::getMessage("BITRIX_XSCAN_RENAMED") . htmlspecialcharsbx($new_f));
		}
		else
		{
			$msg = CBitrixXscan::ShowMsg(Loc::getMessage("BITRIX_XSCAN_ERR_RENAME") . htmlspecialcharsbx($file),
				'red');
		}
	}

	return $msg;
}