From 9e6c405bcdcc10f43397666b09e76d8bcce952f6 Mon Sep 17 00:00:00 2001 From: "Christoph Burchert (Chb)" Date: Fri, 18 Mar 2011 16:24:25 +0100 Subject: [PATCH] fixed return status of executed programs, fixes #670 Signed-off-by: Christoph Burchert (Chb) --- lib/classes/aps/class.ApsInstaller.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/classes/aps/class.ApsInstaller.php b/lib/classes/aps/class.ApsInstaller.php index 054c6b51..9e2f7e04 100644 --- a/lib/classes/aps/class.ApsInstaller.php +++ b/lib/classes/aps/class.ApsInstaller.php @@ -145,8 +145,6 @@ class ApsInstaller extends ApsParser } chdir($this->RealPath . $this->DomainPath . '/install_scripts/'); - $Return = array(); - $ReturnStatus = 0; // make configure-script executable if($this->aps_version != '1.0') @@ -157,6 +155,11 @@ class ApsInstaller extends ApsParser } chmod($this->RealPath . $this->DomainPath . '/install_scripts/'.$scriptname, 0755); + + $Return = array(); + + /* is true by default; later it will contain the return status of the executed program */ + $ReturnStatus = true; $Return = safe_exec('php ' . escapeshellarg($this->RealPath . $this->DomainPath . '/install_scripts/'.$scriptname) . ' install', $ReturnStatus); @@ -629,7 +632,10 @@ class ApsInstaller extends ApsParser else { $ReturnLines = array(); - $ReturnVal = - 1; + + /* true by default; later it will contain the return status of the executed program */ + $ReturnVal = true; + //on 64 bit systems the zip functions can fail -> use exec to extract the files