Пример #1
0
	function CopyDirFiles($fromDir, $toDir)
	{
		if (!in_array("KERNEL", $this->callType))
			return True;

		CUpdateSystem::AddMessage2Log("Run updater '".$this->updater."': CopyDirFiles(".$fromDir.", ".$toDir.")", "CRUPDCDF1");
		$errorMessage = "";

		if (substr($fromDir, 0, 1) != "/")
			$fromDir = $this->curPath."/".$fromDir;

		$fromDirFull = $_SERVER["DOCUMENT_ROOT"].$fromDir;
		$toDirFull = $_SERVER["DOCUMENT_ROOT"].$toDir;

		$result = CUpdateSystem::CopyDirFiles($fromDirFull, $toDirFull, $errorMessage);

		if (!$result)
			$this->errorMessage[] = $errorMessage;

		return $result;
	}