X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Fincludes%2Ffa_patch.class.inc;h=336d924d3cca8e377baea5468f016806bc4de9bb;hb=fabc8d3e9dbd0ebeb28cefcdf85c5abf90a3496f;hp=91e13f1ab51048bea228b4af886352a068c1dab8;hpb=9661cffeeab646dfbd51cf93eb042bb43e9bd061;p=fa-stable.git diff --git a/admin/includes/fa_patch.class.inc b/admin/includes/fa_patch.class.inc index 91e13f1a..336d924d 100644 --- a/admin/includes/fa_patch.class.inc +++ b/admin/includes/fa_patch.class.inc @@ -26,7 +26,7 @@ class fa_patch { var $errors = array(); var $max_upgrade_time = 300; - function fa_patch() + function __construct() { global $path_to_root; @@ -115,7 +115,7 @@ class fa_patch { $this->errors = array(); $this->backup = null; - $this->save_log = ini_set('error_log', dirname(__FILE__).'/../../tmp/upgrade.'.$this->cur_company.'.log'); + $this->save_log = ini_set('error_log', VARLOG_PATH.'/upgrade.'.$this->cur_company.'.log'); $this->log_error(sprintf(_("Upgrade started for company %s."), $this->cur_company), 'Info'); if (!set_global_connection($this->cur_company)) @@ -165,8 +165,7 @@ class fa_patch { { foreach($result as $err) $this->log_error($err[1] . ':'. $err[0]); - } else - { + } else { $this->log_error($result); unset($this->backup); // prevent restore (database was not touched due to other errors) } @@ -242,8 +241,9 @@ class fa_patch { } /* - Present upgrade parameters to administrator - This function presents upgrade choices, after selection company to be upgraded. + Present upgrade parameters to administrator. + This function is run after successfull switching to target database connection + and presents upgrade choices, later fetched in prepare() method. */ function show_params($comp) { @@ -251,7 +251,7 @@ class fa_patch { /* Fetch & check upgrade parameters, check additional upgrade pre-conditions. - This function is run after successfull switching to target database connection. + This function is run after successfull switching to target database connection, before sql upgrade script is run. */ function prepare() {