From 52bffb538bd473ffe0b5e25cf6a4cc393971502b Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Thu, 18 Feb 2021 22:40:43 +0900
Subject: [PATCH 1/2] remove download functionality
---
Monitor/Pages/SettingsAnalyzer.cshtml | 14 -------
Monitor/Pages/_get/DownloadFile.cshtml | 5 ---
Monitor/Pages/_get/DownloadFile.cshtml.cs | 47 -----------------------
3 files changed, 66 deletions(-)
delete mode 100644 Monitor/Pages/_get/DownloadFile.cshtml
delete mode 100644 Monitor/Pages/_get/DownloadFile.cshtml.cs
diff --git a/Monitor/Pages/SettingsAnalyzer.cshtml b/Monitor/Pages/SettingsAnalyzer.cshtml
index 89410c8..ede25c9 100644
--- a/Monitor/Pages/SettingsAnalyzer.cshtml
+++ b/Monitor/Pages/SettingsAnalyzer.cshtml
@@ -34,20 +34,6 @@
-
-
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 900fa5a..0000000
--- a/Monitor/Pages/_get/DownloadFile.cshtml.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-using System;
-using System.Collections;
-using System.IO;
-using Microsoft.Net.Http.Headers;
-using Core.Helper;
-
-namespace Monitor.Pages {
- public class DownloadFileModel : _Internal.BasePageModelSecure {
-
- public void OnGet() {
- // Initialize Config
- base.Init();
-
- // Check we have a log in
- if (base.IsLoggedIn(this.HttpContext))
- {
- InitializeDownload();
- }
- }
-
- private async void InitializeDownload() {
- // Zip the file in an non web accessible folder
- string fileName = GetStringParameter("f", "");
- string tempFolder = PTMagicMonitorBasePath + System.IO.Path.DirectorySeparatorChar + "tmp" + System.IO.Path.DirectorySeparatorChar;
-
- if (System.IO.File.Exists(PTMagicBasePath + fileName)) {
- if (!System.IO.Directory.Exists(tempFolder)) {
- System.IO.Directory.CreateDirectory(tempFolder);
- }
-
- string sourcefilePath = PTMagicBasePath + fileName;
- string destinationFilePath = tempFolder + fileName + ".zip";
-
- ZIPHelper.CreateZipFile(new ArrayList() { sourcefilePath }, destinationFilePath);
-
- // Write out the file
- var data = System.IO.File.ReadAllBytes(destinationFilePath);
-
- Response.ContentType = "application/zip";
- Response.Headers[HeaderNames.CacheControl] = "no-cache";
- Response.Headers[HeaderNames.ContentDisposition] = String.Format("attachment; filename={0}", fileName);
- await Response.BodyWriter.WriteAsync(new Memory(data));
- Response.BodyWriter.Complete();
- }
- }
- }
-}
From 476d887737ba81ad5e2391d32223cec93178e736 Mon Sep 17 00:00:00 2001
From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com>
Date: Thu, 18 Feb 2021 23:15:16 +0900
Subject: [PATCH 2/2] version increment
---
PTMagic/Program.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PTMagic/Program.cs b/PTMagic/Program.cs
index 11bc420..97e290c 100644
--- a/PTMagic/Program.cs
+++ b/PTMagic/Program.cs
@@ -6,7 +6,7 @@ using Core.Helper;
using Microsoft.Extensions.DependencyInjection;
-[assembly: AssemblyVersion("2.5.5")]
+[assembly: AssemblyVersion("2.5.6")]
[assembly: AssemblyProduct("PT Magic")]
namespace PTMagic