From 0930f5fc2fb0d46757cc6e8ba50efcb34e1f7d33 Mon Sep 17 00:00:00 2001
From: laking <laking@ispconfig3>
Date: Sat, 02 Apr 2011 08:54:57 -0400
Subject: [PATCH] Added bugfix for php_open_basedir when client changes. line 293.

---
 server/mods-available/remoteaction_core_module.inc.php |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/server/mods-available/remoteaction_core_module.inc.php b/server/mods-available/remoteaction_core_module.inc.php
index fa51db1..9375233 100644
--- a/server/mods-available/remoteaction_core_module.inc.php
+++ b/server/mods-available/remoteaction_core_module.inc.php
@@ -150,6 +150,10 @@
 	}
 
 	private function _doIspCUpdate($action) {
+		
+		// Ensure that this code is not executed twice as this would cause a loop in case of a failure
+		$this->_actionDone($action['action_id'], 'ok');
+		
 		/*
 		 * Get the version-number of the newest version 
 		 */
@@ -175,17 +179,16 @@
 		exec("tar xvfz ISPConfig-" . $new_version . ".tar.gz");
 
 		/*
-		 * Start the automated update
+		 * Initialize the automated update
+		 * (the update is then done next start of server.sh
 		 */
 		chdir("/tmp/ispconfig3_install/install");
 		exec("touch autoupdate");
-		exec("php -q autoupdate.php");
-
+		
 		/*
 		 * do some clean-up
 		 */
 		exec("rm /tmp/ISPConfig-" . $new_version . ".tar.gz");
-		exec("rm /tmp/ispconfig3_install -R");
 
 		/*
 		 * go back to the "old path"
@@ -195,7 +198,7 @@
 		/*
 		 * All well done!
 		 */
-		$this->_actionDone($action['action_id'], 'ok');
+		//$this->_actionDone($action['action_id'], 'ok');
 	}
 }
 ?>
\ No newline at end of file

--
Gitblit v1.9.1