From 89e7534e40bd9f755cb3151b6d4ccc6984134f33 Mon Sep 17 00:00:00 2001 From: JackTerok Date: Wed, 17 Feb 2021 16:29:08 +0100 Subject: [PATCH] Remove unused download function. --- Monitor/Pages/_get/DownloadFile.cshtml | 5 ---- Monitor/Pages/_get/DownloadFile.cshtml.cs | 36 ----------------------- 2 files changed, 41 deletions(-) delete mode 100644 Monitor/Pages/_get/DownloadFile.cshtml delete mode 100644 Monitor/Pages/_get/DownloadFile.cshtml.cs diff --git a/Monitor/Pages/_get/DownloadFile.cshtml b/Monitor/Pages/_get/DownloadFile.cshtml deleted file mode 100644 index e47402b..0000000 --- a/Monitor/Pages/_get/DownloadFile.cshtml +++ /dev/null @@ -1,5 +0,0 @@ -@page -@model DownloadFileModel -@{ - Layout = null; -} \ No newline at end of file diff --git a/Monitor/Pages/_get/DownloadFile.cshtml.cs b/Monitor/Pages/_get/DownloadFile.cshtml.cs deleted file mode 100644 index 63498ca..0000000 --- a/Monitor/Pages/_get/DownloadFile.cshtml.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using Core.Main; -using Core.Helper; -using Core.Main.DataObjects.PTMagicData; -using Core.MarketAnalyzer; - -namespace Monitor.Pages { - public class DownloadFileModel : _Internal.BasePageModelSecure { - - public void OnGet() { - // Initialize Config - base.Init(); - - InitializeDownload(); - } - - private void InitializeDownload() { - string fileName = GetStringParameter("f", ""); - if (System.IO.File.Exists(PTMagicBasePath + fileName)) { - if (!System.IO.Directory.Exists(PTMagicMonitorBasePath + "wwwroot" + System.IO.Path.DirectorySeparatorChar + "assets" + System.IO.Path.DirectorySeparatorChar + "tmp" + System.IO.Path.DirectorySeparatorChar)) { - System.IO.Directory.CreateDirectory(PTMagicMonitorBasePath + "wwwroot" + System.IO.Path.DirectorySeparatorChar + "assets" + System.IO.Path.DirectorySeparatorChar + "tmp" + System.IO.Path.DirectorySeparatorChar); - } - - string sourcefilePath = PTMagicBasePath + fileName; - string destinationFilePath = PTMagicMonitorBasePath + "wwwroot" + System.IO.Path.DirectorySeparatorChar + "assets" + System.IO.Path.DirectorySeparatorChar + "tmp" + System.IO.Path.DirectorySeparatorChar + fileName + ".zip"; - - ZIPHelper.CreateZipFile(new ArrayList() { sourcefilePath }, destinationFilePath); - - Response.Redirect(PTMagicConfiguration.GeneralSettings.Monitor.RootUrl + "assets/tmp/" + fileName + ".zip"); - } - } - } -}