From e43a5e563f66e80263494570cff430beafdbacb8 Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Mon, 26 Aug 2013 10:58:01 -0400
Subject: [PATCH] - Improved patch script

---
 server/scripts/ispconfig_patch.php |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/server/scripts/ispconfig_patch.php b/server/scripts/ispconfig_patch.php
index 20d1d7d..02c75e1 100644
--- a/server/scripts/ispconfig_patch.php
+++ b/server/scripts/ispconfig_patch.php
@@ -105,6 +105,15 @@
     die();
 }
 
+$patch_text = @file_get_contents('http://ispconfig.org/downloads/patches/' . $patch_id . '.txt');
+if($patch_text) {
+    $ok = simple_query("Patch description:\n".$patch_text."\n".str_repeat("-", 80)."Do you really want to apply this patch now?", array('y','n'), 'y');
+    if($ok != 'y') {
+        swriteln("Patch terminated by user.\n");
+        die();
+    }
+}
+
 $temp_file = tempnam(sys_get_temp_dir(), 'ispc');
 
 file_put_contents($temp_file, $patch_data);

--
Gitblit v1.9.1