X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/48963f462b5fff937438ca93bcc537d78e454f30..fdebfd5d0c558cb156849b01c9c9268b29dc443b:/sql/Pg-upgrade2/auth_enable_ct_all_edit.pl diff --git a/sql/Pg-upgrade2/auth_enable_ct_all_edit.pl b/sql/Pg-upgrade2/auth_enable_ct_all_edit.pl index 0579675cb..040d9b64e 100644 --- a/sql/Pg-upgrade2/auth_enable_ct_all_edit.pl +++ b/sql/Pg-upgrade2/auth_enable_ct_all_edit.pl @@ -2,21 +2,19 @@ # @description: Zusätzliches Recht alle Kunden / Lieferanten editieren, war bisher standardmäßig IMMER so und kann jetzt deaktiviert werden # falls es deaktiviert wird, kann ich den Kunden / Lieferanten nur editieren wenn ich selber als Verkäufer eingetragen bin # @depends: release_2_6_3 -# @charset: utf-8 +package SL::DBUpgrade2::auth_enable_ct_all_edit; -use utf8; use strict; -use Data::Dumper; -die("This script cannot be run from the command line.") unless ($main::form); +use utf8; -sub mydberror { - my ($msg) = @_; - die($dbup_locale->text("Database update error:") . - "
$msg
" . $DBI::errstr); -} +use parent qw(SL::DBUpgrade2::Base); -sub do_update { - my $dbh = $main::auth->dbconnect(); +use SL::DBUtils; + +sub run { + my ($self) = @_; + + $self->dbh($::auth->dbconnect); my $query = <dbh, $query); if (@group_ids) { $query = <dbh, $query); foreach my $id (@group_ids) { - do_statement($form, $sth, $query, $id); + do_statement($::form, $sth, $query, $id); } $sth->finish(); - $dbh->commit(); + $self->dbh->commit(); } return 1; } -return do_update(); - +1;