From 4bb02c5fd3223620b08e01791a9205e12d695553 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 17 Jun 2013 11:11:46 +0200 Subject: [PATCH] Admin-Bereich: Funktionen zum Aktualisieren von Datenbanken aus Admin-Bereich entfernt --- bin/mozilla/admin.pl | 47 ----------------- .../webpages/admin/dbupgrade_all_done.html | 13 ----- .../webpages/admin/dbupgrade_all_header.html | 1 - .../webpages/admin/dbupgrade_footer.html | 2 - .../webpages/admin/dbupgrade_header.html | 2 - templates/webpages/admin/update_dataset.html | 51 ------------------- 6 files changed, 116 deletions(-) delete mode 100644 templates/webpages/admin/dbupgrade_all_done.html delete mode 100644 templates/webpages/admin/dbupgrade_all_header.html delete mode 100644 templates/webpages/admin/dbupgrade_footer.html delete mode 100644 templates/webpages/admin/dbupgrade_header.html delete mode 100644 templates/webpages/admin/update_dataset.html diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl index 8d0e4426f..b6569ecdc 100755 --- a/bin/mozilla/admin.pl +++ b/bin/mozilla/admin.pl @@ -134,53 +134,6 @@ sub continue { call_sub($main::form->{"nextsub"}); } -sub update_dataset { - my $form = $main::form; - my $locale = $main::locale; - - $form->{title} = "kivitendo " . $locale->text('Database Administration') . " / " . $locale->text('Update Dataset'); - - my @need_updates = User->dbneedsupdate($form); - $form->{NEED_UPDATES} = \@need_updates; - $form->{ALL_UPDATED} = !scalar @need_updates; - - $form->header(); - print $form->parse_html_template("admin/update_dataset"); -} - -sub dbupdate { - my $form = $main::form; - my $locale = $main::locale; - - $::request->{layout}->use_stylesheet("lx-office-erp.css"); - $form->{title} = $locale->text("Dataset upgrade"); - $form->header(); - - my $rowcount = $form->{rowcount} * 1; - my @update_rows = grep { $form->{"update_$_"} } (1 .. $rowcount); - $form->{NOTHING_TO_DO} = !scalar @update_rows; - my $saved_form = save_form(); - - $| = 1; - - print $form->parse_html_template("admin/dbupgrade_all_header"); - - foreach my $i (@update_rows) { - restore_form($saved_form); - - %::myconfig = (); - map { $form->{$_} = $::myconfig{$_} = $form->{"${_}_${i}"} } qw(dbname dbhost dbport dbuser dbpasswd); - - print $form->parse_html_template("admin/dbupgrade_header"); - - User->dbupdate($form); - User->dbupdate2(form => $form, updater => SL::DBUpgrade2->new(form => $form)->parse_dbupdate_controls, database => $form->{dbname}); - - print $form->parse_html_template("admin/dbupgrade_footer"); - } - - print $form->parse_html_template("admin/dbupgrade_all_done"); -} sub create_dataset { my $form = $main::form; diff --git a/templates/webpages/admin/dbupgrade_all_done.html b/templates/webpages/admin/dbupgrade_all_done.html deleted file mode 100644 index 3d9917977..000000000 --- a/templates/webpages/admin/dbupgrade_all_done.html +++ /dev/null @@ -1,13 +0,0 @@ -[%- USE T8 %] -[% USE HTML%][%- USE LxERP -%][%- USE L -%] -[% IF NOTHING_TO_DO %] -

[% 'No datasets have been selected.' | $T8 %]

- - [% ELSE %] - -
- -

[% 'All database upgrades have been applied.' | $T8 %]

-[% END %] - -

[% L.link("controller.pl?action=Admin/show", LxERP.t8("Continue")) %]

diff --git a/templates/webpages/admin/dbupgrade_all_header.html b/templates/webpages/admin/dbupgrade_all_header.html deleted file mode 100644 index 8b1378917..000000000 --- a/templates/webpages/admin/dbupgrade_all_header.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/templates/webpages/admin/dbupgrade_footer.html b/templates/webpages/admin/dbupgrade_footer.html deleted file mode 100644 index 28e285684..000000000 --- a/templates/webpages/admin/dbupgrade_footer.html +++ /dev/null @@ -1,2 +0,0 @@ -[%- USE T8 %] -

[% '...done' | $T8 %]

diff --git a/templates/webpages/admin/dbupgrade_header.html b/templates/webpages/admin/dbupgrade_header.html deleted file mode 100644 index 1a81e964c..000000000 --- a/templates/webpages/admin/dbupgrade_header.html +++ /dev/null @@ -1,2 +0,0 @@ -[%- USE T8 %] -[% USE HTML %]

[% 'Dataset upgrade' | $T8 %] ([% HTML.escape(dbname) %])

diff --git a/templates/webpages/admin/update_dataset.html b/templates/webpages/admin/update_dataset.html deleted file mode 100644 index d8fb9336c..000000000 --- a/templates/webpages/admin/update_dataset.html +++ /dev/null @@ -1,51 +0,0 @@ -[%- USE T8 %] -[%- USE HTML %] -

[% title %]

-

[% 'Back' | $T8 %]

- [% IF ALL_UPDATED %] - [% 'All Datasets up to date!' | $T8 %] - - [% ELSE %] - -
- -

[% 'The following Datasets need to be updated' | $T8 %]:

- - - - - - - - - - - [% FOREACH row = NEED_UPDATES %] - - - - - - - - - [% END %] -
[% 'Update?' | $T8 %][% 'Driver' | $T8 %][% 'Host' | $T8 %][% 'Port' | $T8 %][% 'User' | $T8 %]
- - - [% HTML.escape(row.dbhost) %][% HTML.escape(row.dbport) %][% HTML.escape(row.dbuser) %]
- - - - - - -
- -
- - - -
- - [% END %] -- 2.20.1