]> wagnertech.de Git - kivitendo-erp.git/commitdiff
Funktionslokale Variablen nicht als global deklarieren.
authorMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 9 Nov 2009 13:40:19 +0000 (14:40 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 9 Nov 2009 13:40:19 +0000 (14:40 +0100)
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
sql/Pg-upgrade2/USTVA_at.pl
sql/Pg-upgrade2/cp_greeting_migration.pl
sql/Pg-upgrade2/globalprojectnumber_ap_ar_oe.pl
sql/Pg-upgrade2/warehouse.pl

index 83dffc6f767e077c950e57f57bad0629d9a22729..96c6b73b4524bff03ace0629be7dc4ae9a982643 100644 (file)
@@ -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:") .
index 0ad72a0c34fcd339b09b6afb62d53f775a72f5a1..24fa60850b2482157a5a14b2d50b1c46b5c5b7d7 100644 (file)
@@ -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() )  {
index 40c1ebdfac56954dffe3b47cee9fdaaa9bd2cb22..3b978a542aa6090de95cbc13dd48dac4320ebf4a 100644 (file)
@@ -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:") .
index 6edd14dc4e109f330a0dac83a81a8231bd18bb70..608e44207a625aa2cc04a7e91e7588b2fd24c06a 100644 (file)
@@ -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 {
index 725758f19a130fc72fde12b1a5bde30476bd9e86..a9b152f9e8bf2c4c652d817ea2ad0c491591da8c 100644 (file)
@@ -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);