From 03ca3d74f96bf05a9c632b3e0f9538785d8a0fc6 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 9 Nov 2009 14:40:19 +0100 Subject: [PATCH] Funktionslokale Variablen nicht als global deklarieren. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fix für Bugs 1251 und 1253. Hintergrund: Die DB-Upgradescripte werden mittels eval im Kontext einer Unterfunktion aufgerufen. Die Variablen, die fälschlicherweise innerhalb der Upgradescripte mit "our" als global deklariert wurden, sind aber innerhalb der Unterfunktion, aus der sie ge-eval-t werden, nur mit "my" deklariert worden. Falls das nun einige der automatischen Tests fehlschlagen lassen sollte, dann müsste sich das Sven bitte nochmal ansehen. --- sql/Pg-upgrade2/USTVA_abstraction.pl | 3 --- sql/Pg-upgrade2/USTVA_at.pl | 3 --- sql/Pg-upgrade2/cp_greeting_migration.pl | 3 --- sql/Pg-upgrade2/globalprojectnumber_ap_ar_oe.pl | 3 --- sql/Pg-upgrade2/warehouse.pl | 2 -- 5 files changed, 14 deletions(-) diff --git a/sql/Pg-upgrade2/USTVA_abstraction.pl b/sql/Pg-upgrade2/USTVA_abstraction.pl index 83dffc6f7..96c6b73b4 100644 --- a/sql/Pg-upgrade2/USTVA_abstraction.pl +++ b/sql/Pg-upgrade2/USTVA_abstraction.pl @@ -12,9 +12,6 @@ use strict; die("This script cannot be run from the command line.") unless ($main::form); -# import vars from caller -our ($dbup_locale, $dbup_myconfig, $dbh, $iconv); - sub mydberror { my ($msg) = @_; die($dbup_locale->text("Database update error:") . diff --git a/sql/Pg-upgrade2/USTVA_at.pl b/sql/Pg-upgrade2/USTVA_at.pl index 0ad72a0c3..24fa60850 100644 --- a/sql/Pg-upgrade2/USTVA_at.pl +++ b/sql/Pg-upgrade2/USTVA_at.pl @@ -8,9 +8,6 @@ unless ( $main::form ) { die("This script cannot be run from the command line."); } -# import vars from caller -our ($dbup_locale, $dbup_myconfig, $dbh, $iconv); - if ( check_coa('Austria') ){ if ( coa_is_empty() ) { diff --git a/sql/Pg-upgrade2/cp_greeting_migration.pl b/sql/Pg-upgrade2/cp_greeting_migration.pl index 40c1ebdfa..3b978a542 100644 --- a/sql/Pg-upgrade2/cp_greeting_migration.pl +++ b/sql/Pg-upgrade2/cp_greeting_migration.pl @@ -6,9 +6,6 @@ use strict; die("This script cannot be run from the command line.") unless ($main::form); -# import vars from caller -our ($dbup_locale, $dbup_myconfig, $dbh, $iconv); - sub mydberror { my ($msg) = @_; die($dbup_locale->text("Database update error:") . diff --git a/sql/Pg-upgrade2/globalprojectnumber_ap_ar_oe.pl b/sql/Pg-upgrade2/globalprojectnumber_ap_ar_oe.pl index 6edd14dc4..608e44207 100644 --- a/sql/Pg-upgrade2/globalprojectnumber_ap_ar_oe.pl +++ b/sql/Pg-upgrade2/globalprojectnumber_ap_ar_oe.pl @@ -4,9 +4,6 @@ use strict; -# import vars from caller -our ($dbup_locale, $dbup_myconfig, $dbh); - die("This script cannot be run from the command line.") unless ($main::form); sub mydberror { diff --git a/sql/Pg-upgrade2/warehouse.pl b/sql/Pg-upgrade2/warehouse.pl index 725758f19..a9b152f9e 100644 --- a/sql/Pg-upgrade2/warehouse.pl +++ b/sql/Pg-upgrade2/warehouse.pl @@ -6,8 +6,6 @@ use strict; die("This script cannot be run from the command line.") unless ($main::form); -# import vars from caller -our ($dbup_locale, $dbup_myconfig, $dbh, $iconv); my $do_sql_migration = 0; my ($check_sql, $sqlcode); -- 2.20.1