X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Finst_upgrade.php;h=eeee26a214b88152e2a01d84e9d607643f40eeb7;hb=9748e7965d509b96170b4dc044347a797b995956;hp=670ecb1515d260bbdf3ccad7a05f7cd016d52282;hpb=9c64823643539c3fedb53ccf70b5104125e57f35;p=fa-stable.git diff --git a/admin/inst_upgrade.php b/admin/inst_upgrade.php index 670ecb15..eeee26a2 100644 --- a/admin/inst_upgrade.php +++ b/admin/inst_upgrade.php @@ -69,7 +69,7 @@ function get_installers() while(false !== ($fname = readdir($datadir))) { // check all php files but index.php if (!is_dir($patchdir . $fname) && ($fname != 'index.php') - && stristr($fname, '.php') != false) + && stristr($fname, '.php') != false && $fname[0] != '.') { unset($install); include_once($patchdir . $fname); @@ -102,10 +102,16 @@ function upgrade_step($index, $conn) if (!$inst->pre_check($pref, $force)) return false; $sql = $inst->sql; + error_log(sprintf(_("Database upgrade for company '%s' (%s:%s*) started..."), + $conn['name'], $conn['dbname'], $conn['tbpref'])); + if ($sql != '') $ret &= db_import($path_to_root.'/sql/'.$sql, $conn, $force); $ret &= $inst->install($pref, $force); + + error_log(_("Database upgrade finished.")); + } else if ($state!==true) { display_error(_("Upgrade cannot be done because database has been already partially upgraded. Please downgrade database to clean previous version or try forced upgrade.")); @@ -165,11 +171,12 @@ if (get_post('Upgrade')) display_notification(_('All companies data has been successfully updated')); } unset($_SESSION['SysPrefs']); // re-read system setup + $_SESSION['SysPrefs'] = new sys_prefs(); $Ajax->activate('_page_body'); } start_form(); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Version"), _("Description"), _("Sql file"), _("Install"), _("Force upgrade")); table_header($th);