X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Finst_upgrade.php;h=183221e1ada5c451ee715e3af6ad346261432296;hb=5866801d02b8007f74ea5bfd15a8ecac7c1c58c1;hp=5e5e1a9809ff1a514011a2fe8d659fb659597234;hpb=052d2ef59dfd71c239c163d9c9ace5f75f65ac01;p=fa-stable.git diff --git a/admin/inst_upgrade.php b/admin/inst_upgrade.php index 5e5e1a98..183221e1 100644 --- a/admin/inst_upgrade.php +++ b/admin/inst_upgrade.php @@ -86,7 +86,6 @@ foreach($site_status as $i => $comp) } else label_cell('-', 'align=center'); - if (!$status) { label_cell(radio(null, 'select_comp', $i, null, true), 'align=center'); @@ -103,8 +102,14 @@ div_start('upgrade_args'); if (get_post('select_comp') !== '') { $patch = @$installers[$site_status[get_post('select_comp')]['version']]; - if ($patch) - $patch->show_params(get_post('select_comp')); + if ($patch) { + if (!set_global_connection(get_post('select_comp'))) // create page in target database context + display_error(_("Cannot connect to company database for database restore.")); + else { + $patch->show_params(get_post('select_comp')); + set_global_connection(); // switch back + } + } } div_end();