Admin-Bereich: Funktionen zum Aktualisieren von Datenbanken aus Admin-Bereich entfernt
authorMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 17 Jun 2013 09:11:46 +0000 (11:11 +0200)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 17 Jun 2013 09:28:44 +0000 (11:28 +0200)
bin/mozilla/admin.pl
templates/webpages/admin/dbupgrade_all_done.html [deleted file]
templates/webpages/admin/dbupgrade_all_header.html [deleted file]
templates/webpages/admin/dbupgrade_footer.html [deleted file]
templates/webpages/admin/dbupgrade_header.html [deleted file]
templates/webpages/admin/update_dataset.html [deleted file]

index 8d0e442..b6569ec 100755 (executable)
@@ -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 (file)
index 3d99179..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-[%- USE T8 %]
-[% USE HTML%][%- USE LxERP -%][%- USE L -%]
-[% IF NOTHING_TO_DO %]
- <p>[% 'No datasets have been selected.' | $T8 %]</p>
-
- [% ELSE %]
-
- <hr>
-
- <p>[% 'All database upgrades have been applied.' | $T8 %]</p>
-[% END %]
-
-<p>[% L.link("controller.pl?action=Admin/show", LxERP.t8("Continue")) %]</p>
diff --git a/templates/webpages/admin/dbupgrade_all_header.html b/templates/webpages/admin/dbupgrade_all_header.html
deleted file mode 100644 (file)
index 8b13789..0000000
+++ /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 (file)
index 28e2856..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-[%- USE T8 %]
-<p>[% '...done' | $T8 %]</p>
diff --git a/templates/webpages/admin/dbupgrade_header.html b/templates/webpages/admin/dbupgrade_header.html
deleted file mode 100644 (file)
index 1a81e96..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-[%- USE T8 %]
-[% USE HTML %]<h1>[% 'Dataset upgrade' | $T8 %] ([% HTML.escape(dbname) %])</h1>
diff --git a/templates/webpages/admin/update_dataset.html b/templates/webpages/admin/update_dataset.html
deleted file mode 100644 (file)
index d8fb933..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-[%- USE T8 %]
-[%- USE HTML %]
- <h1>[% title %]</h1>
- <p><a href="admin.pl?action=pg_database_administration">[% 'Back' | $T8 %]</a></p>
- [% IF ALL_UPDATED %]
-  [% 'All Datasets up to date!' | $T8 %]
-
-  [% ELSE %]
-
-  <form method="post" action="admin.pl">
-
-   <p>[% 'The following Datasets need to be updated' | $T8 %]:</p>
-
-   <table>
-    <tr>
-     <th class="listtop">[% 'Update?' | $T8 %]</th>
-     <th class="listtop">[% 'Driver' | $T8 %]</th>
-     <th class="listtop">[% 'Host' | $T8 %]</th>
-     <th class="listtop">[% 'Port' | $T8 %]</th>
-     <th class="listtop">[% 'User' | $T8 %]</th>
-    </tr>
-
-    [% FOREACH row = NEED_UPDATES %]
-     <tr class="listrow[% loop.count % 2 %]">
-      <td><input type="checkbox" name="update_[% loop.count %]" id="update_[% loop.count %]" value="1" checked></td>
-      <td>
-       <input type="hidden" name="dbname_[% loop.count %]" value="[% HTML.escape(row.dbname) %]">
-       <label for="update_[% loop.count %]">[% HTML.escape(row.dbname) %]</label>
-      </td>
-      <td><input type="hidden" name="dbhost_[% loop.count %]" value="[% HTML.escape(row.dbhost) %]">[% HTML.escape(row.dbhost) %]</td>
-      <td><input type="hidden" name="dbport_[% loop.count %]" value="[% HTML.escape(row.dbport) %]">[% HTML.escape(row.dbport) %]</td>
-      <td><input type="hidden" name="dbuser_[% loop.count %]" value="[% HTML.escape(row.dbuser) %]">[% HTML.escape(row.dbuser) %]</td>
-     </tr>
-
-    [% END %]
-   </table>
-
-   <input type="hidden" name="rowcount" value="[% NEED_UPDATES.size %]">
-
-   <input name="callback" type="hidden" value="controller.pl?action=Admin/show">
-   <input type="hidden" name="nextsub" value="dbupdate">
-
-   <hr size="3" noshade>
-
-   <br>
-
-   <input type="submit" class="submit" name="action" value="[% 'Continue' | $T8 %]">
-
-  </form>
-
- [% END %]