X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=sql%2FPg-upgrade2%2Fauth_enable_ct_all_edit.pl;h=040d9b64e8ac5e7222fcba634bcfaa46a6916c2d;hb=953b505f3da71b5de15e21f812f06f4d6e6f2721;hp=0579675cbaf5e8e4ca4aa9ed7031ff7a22de6755;hpb=48963f462b5fff937438ca93bcc537d78e454f30;p=kivitendo-erp.git
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;