X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=sql%2FPg-upgrade2%2Fauth_enable_sales_all_edit.pl;h=2a8595c613e917a1816362efb332fcfe621dd8da;hb=8bde65163db8c36ffa5e83bed7ee68ab859c106d;hp=c6101e664624a460323c2a980fab61478b06edac;hpb=4d0aa32fda51cc3d29dda45bf492550b019ebcf3;p=kivitendo-erp.git
diff --git a/sql/Pg-upgrade2/auth_enable_sales_all_edit.pl b/sql/Pg-upgrade2/auth_enable_sales_all_edit.pl
index c6101e664..2a8595c61 100644
--- a/sql/Pg-upgrade2/auth_enable_sales_all_edit.pl
+++ b/sql/Pg-upgrade2/auth_enable_sales_all_edit.pl
@@ -1,21 +1,19 @@
# @tag: auth_enable_sales_all_edit
# @description: Neues gruppenbezogenes Recht für den Bereich Verkauf hinzugefügt (sales_all_edit := Nur wenn angehakt, können Verkaufsdokumente von anderen Bearbeitern eingesehen werden) Das Skript hakt standardmässig dieses Recht an, sodass es keinen Unterschied zu vorhergehenden Version gibt.
# @depends: release_2_6_0
-# @charset: utf-8
+package SL::DBUpgrade2::auth_enable_sales_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;