From 9c8ae1639625001dd36d44a085714d13a75eb73c Mon Sep 17 00:00:00 2001 From: mike_p <mike_p@ispconfig3> Date: Sat, 29 May 2010 16:45:45 -0400 Subject: [PATCH] fix bug FS#1200 - id elents should be unique. have changed side nav template, this needs to change too. --- server/mods-available/remoteaction_core_module.inc.php | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/server/mods-available/remoteaction_core_module.inc.php b/server/mods-available/remoteaction_core_module.inc.php index 7e8c0b1..1c4e54e 100644 --- a/server/mods-available/remoteaction_core_module.inc.php +++ b/server/mods-available/remoteaction_core_module.inc.php @@ -118,6 +118,13 @@ * we stop executing the actions not to waste more time */ return; } + if ($action['action_type'] == 'ispc_update') { + /* do the update */ + $this->_doIspCUpdate($action); + /* this action takes so much time, + * we stop executing the actions not to waste more time */ + return; + } } } @@ -134,5 +141,29 @@ $this->_actionDone($action['action_id'], 'ok'); } + private function _doIspCUpdate($action) { + $new_version = @file_get_contents('http://www.ispconfig.org/downloads/ispconfig3_version.txt'); + $new_version = trim($new_version); + /* + * Do the update + */ + $oldDir = getcwd(); + chdir("/tmp"); + + exec("rm /tmp/ISPConfig-" . $new_version . ".tar.gz"); + exec("rm /tmp/ispconfig3_install -R"); + exec("wget http://www.ispconfig.org/downloads/ISPConfig-" . $new_version . ".tar.gz"); + exec("tar xvfz ISPConfig-" . $new_version . ".tar.gz"); + + chdir("/tmp/ispconfig3_install/install"); + exec("touch autoupdate"); + exec("php -q autoupdate.php"); + + /* + * All well done! + */ + $this->_actionDone($action['action_id'], 'ok'); + } + } ?> \ No newline at end of file -- Gitblit v1.9.1