Improved key_in_foreign table function to check in multiply tables.
[fa-stable.git] / admin / inst_upgrade.php
index 1d646af2ed571835653f693a1418ce48597066ea..5084954f1edb6228acca81a11ff3ad605cff77e5 100644 (file)
@@ -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."));
@@ -164,11 +170,12 @@ if (get_post('Upgrade'))
                $_SESSION["wa_current_user"]->prefs = new user_prefs($user);
                display_notification(_('All companies data has been successfully updated'));
        }       
+       unset($_SESSION['SysPrefs']); // re-read system setup
        $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);