[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [284] trunk/LedgerSMB



Revision: 284
          http://svn.sourceforge.net/ledger-smb/?rev=284&view=rev
Author:   einhverfr
Date:     2006-10-23 20:45:40 -0700 (Mon, 23 Oct 2006)

Log Message:
-----------
Fixing breadead mistakes when moving variables to new namespace

Modified Paths:
--------------
    trunk/LedgerSMB/AA.pm
    trunk/LedgerSMB/AM.pm
    trunk/LedgerSMB/BP.pm
    trunk/LedgerSMB/CP.pm
    trunk/LedgerSMB/Form.pm
    trunk/LedgerSMB/IR.pm
    trunk/LedgerSMB/IS.pm
    trunk/LedgerSMB/JC.pm
    trunk/LedgerSMB/OE.pm

Modified: trunk/LedgerSMB/AA.pm
===================================================================
--- trunk/LedgerSMB/AA.pm	2006-10-24 02:47:46 UTC (rev 283)
+++ trunk/LedgerSMB/AA.pm	2006-10-24 03:45:40 UTC (rev 284)
@@ -595,11 +595,11 @@
 	my $sth = $dbh->prepare($query);
 	$sth->execute($form->{id}) || $form->dberror($query);
 
-	my ${LedgerSMB::Sysconfig::spool}file;
+	my $spoolfile;
 	my @spoolfiles = ();
 
-	while ((${LedgerSMB::Sysconfig::spool}file) = $sth->fetchrow_array) {
-		push @spoolfiles, ${LedgerSMB::Sysconfig::spool}file;
+	while (($spoolfile) = $sth->fetchrow_array) {
+		push @spoolfiles, $spoolfile;
 	}
  
 	$sth->finish;
@@ -611,7 +611,7 @@
 	my $rc = $dbh->commit;
 
 	if ($rc) {
-		foreach ${LedgerSMB::Sysconfig::spool}file (@spoolfiles) {
+		foreach $spoolfile (@spoolfiles) {
 			unlink "${LedgerSMB::Sysconfig::spool}/$spoolfile" if $spoolfile;
 		}
 	}

Modified: trunk/LedgerSMB/AM.pm
===================================================================
--- trunk/LedgerSMB/AM.pm	2006-10-24 02:47:46 UTC (rev 283)
+++ trunk/LedgerSMB/AM.pm	2006-10-24 03:45:40 UTC (rev 284)
@@ -1239,7 +1239,6 @@
 	if ($form->{file} =~ /^(.:)*?\/|\.\.\/|^\//){
 		$form->error("Directory transversal not allowed.");
 	}
-	my ${LedgerSMB::Sysconfig::userspath} = ${main::userspath};
 	if ($form->{file} =~ /^${LedgerSMB::Sysconfig::userspath}\//){
 		$form->error("Not allowed to access ${LedgerSMB::Sysconfig::userspath}/ with this method");
 	}
@@ -1293,7 +1292,7 @@
 
 sub save_preferences {
 
-	my ($self, $myconfig, $form, ${LedgerSMB::Sysconfig::memberfile}, ${LedgerSMB::Sysconfig::userspath}) = @_;
+	my ($self, $myconfig, $form) = @_;
 
 	# connect to database
 	my $dbh = $form->{dbh};
@@ -1566,7 +1565,7 @@
 
 sub backup {
 
-	my ($self, $myconfig, $form, ${LedgerSMB::Sysconfig::userspath}, ${LedgerSMB::Sysconfig::gzip}) = @_;
+	my ($self, $myconfig, $form) = @_;
 
 	my $mail;
 	my $err;

Modified: trunk/LedgerSMB/BP.pm
===================================================================
--- trunk/LedgerSMB/BP.pm	2006-10-24 02:47:46 UTC (rev 283)
+++ trunk/LedgerSMB/BP.pm	2006-10-24 03:45:40 UTC (rev 284)
@@ -244,7 +244,7 @@
 
 sub delete_spool {
 
-	my ($self, $myconfig, $form, ${LedgerSMB::Sysconfig::spool}) = @_;
+	my ($self, $myconfig, $form) = @_;
 
 	# connect to database, turn AutoCommit off
 	my $dbh = $form->dbconnect_noauto($myconfig);
@@ -293,7 +293,7 @@
 
 sub print_spool {
 
-	my ($self, $myconfig, $form, ${LedgerSMB::Sysconfig::spool}) = @_;
+	my ($self, $myconfig, $form) = @_;
 
 	# connect to database
 	my $dbh = $form->dbconnect_noauto($myconfig);
@@ -312,10 +312,10 @@
 			open(OUT, $form->{OUT}) or $form->error("$form->{OUT} : $!");
 			binmode(OUT);
 
-			${LedgerSMB::Sysconfig::spool}file = qq|$spool/$form->{"spoolfile_$i"}|;
+			$spoolfile = qq|$spool/$form->{"spoolfile_$i"}|;
 
 			# send file to printer
-			open(IN, ${LedgerSMB::Sysconfig::spool}file) or $form->error("$spoolfile : $!");
+			open(IN, $spoolfile) or $form->error("$spoolfile : $!");
 			binmode(IN);
 
 			while (<IN>) {

Modified: trunk/LedgerSMB/CP.pm
===================================================================
--- trunk/LedgerSMB/CP.pm	2006-10-24 02:47:46 UTC (rev 283)
+++ trunk/LedgerSMB/CP.pm	2006-10-24 03:45:40 UTC (rev 284)
@@ -268,7 +268,7 @@
 
 	my $vth = $dbh->prepare($query);
 
-	my ${LedgerSMB::Sysconfig::spool}file;
+	my $spoolfile;
 
 	while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
 
@@ -278,8 +278,8 @@
 		$vth->execute($ref->{id});
 		$ref->{queue} = "";
 	
-		while ((${LedgerSMB::Sysconfig::spool}file) = $vth->fetchrow_array) {
-			$ref->{queued} .= "$form->{formname} ${LedgerSMB::Sysconfig::spool}file ";
+		while (($spoolfile) = $vth->fetchrow_array) {
+			$ref->{queued} .= "$form->{formname} $spoolfile ";
 		}
 
 		$vth->finish;

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2006-10-24 02:47:46 UTC (rev 283)
+++ trunk/LedgerSMB/Form.pm	2006-10-24 03:45:40 UTC (rev 284)
@@ -572,7 +572,7 @@
 
 sub parse_template {
 
-	my ($self, $myconfig, ${LedgerSMB::Sysconfig::userspath}) = @_;
+	my ($self, $myconfig) = @_;
 
 	my ($chars_per_line, $lines_on_first_page, $lines_on_second_page) = (0, 0, 0);
 	my ($current_page, $current_line) = (1, 1);
@@ -2409,7 +2409,7 @@
 	my $dbh = $self->{dbh};
 
 	my %queued = split / +/, $self->{queued};
-	my ${LedgerSMB::Sysconfig::spool}file = ($queued{$self->{formname}}) ? "'$queued{$self->{formname}}'" : 'NULL';
+	my $spoolfile = ($queued{$self->{formname}}) ? "'$queued{$self->{formname}}'" : 'NULL';
 
 	my $query = qq|DELETE FROM status
 					WHERE formname = ?
@@ -2429,7 +2429,7 @@
 		VALUES (?, ?, ?, ?, ?)|;
 
 	$sth = $dbh->prepare($query);
-	$sth->execute($self->{id}, $printed, $emailed, ${LedgerSMB::Sysconfig::spool}file, 
+	$sth->execute($self->{id}, $printed, $emailed, $spoolfile, 
 			$self->{formname});
 	$sth->finish;
 

Modified: trunk/LedgerSMB/IR.pm
===================================================================
--- trunk/LedgerSMB/IR.pm	2006-10-24 02:47:46 UTC (rev 283)
+++ trunk/LedgerSMB/IR.pm	2006-10-24 03:45:40 UTC (rev 284)
@@ -705,11 +705,11 @@
   my $sth = $dbh->prepare($query);
   $sth->execute || $form->dberror($query);
 
-  my ${LedgerSMB::Sysconfig::spool}file;
+  my $spoolfile;
   my @spoolfiles = ();
 
-  while ((${LedgerSMB::Sysconfig::spool}file) = $sth->fetchrow_array) {
-    push @spoolfiles, ${LedgerSMB::Sysconfig::spool}file;
+  while (($spoolfile) = $sth->fetchrow_array) {
+    push @spoolfiles, $spoolfile;
   }
   $sth->finish;
   
@@ -730,7 +730,7 @@
       $dbh->commit;
     }
 
-    foreach ${LedgerSMB::Sysconfig::spool}file (@spoolfiles) {
+    foreach $spoolfile (@spoolfiles) {
       unlink "${LedgerSMB::Sysconfig::spool}/$spoolfile" if $spoolfile;
     }
   }

Modified: trunk/LedgerSMB/IS.pm
===================================================================
--- trunk/LedgerSMB/IS.pm	2006-10-24 02:47:46 UTC (rev 283)
+++ trunk/LedgerSMB/IS.pm	2006-10-24 03:45:40 UTC (rev 284)
@@ -1226,7 +1226,7 @@
 
 
 sub delete_invoice {
-  my ($self, $myconfig, $form, ${LedgerSMB::Sysconfig::spool}) = @_;
+  my ($self, $myconfig, $form) = @_;
 
   # connect to database
   my $dbh = $form->dbconnect_noauto($myconfig);
@@ -1253,11 +1253,11 @@
   my $sth = $dbh->prepare($query);
   $sth->execute || $form->dberror($query);
 
-  my ${LedgerSMB::Sysconfig::spool}file;
+  my $spoolfile;
   my @spoolfiles = ();
   
-  while ((${LedgerSMB::Sysconfig::spool}file) = $sth->fetchrow_array) {
-    push @spoolfiles, ${LedgerSMB::Sysconfig::spool}file;
+  while (($spoolfile) = $sth->fetchrow_array) {
+    push @spoolfiles, $spoolfile;
   }
   $sth->finish;  
 
@@ -1269,7 +1269,7 @@
   my $rc = $dbh->commit;
 
   if ($rc) {
-    foreach ${LedgerSMB::Sysconfig::spool}file (@spoolfiles) {
+    foreach $spoolfile (@spoolfiles) {
       unlink "${LedgerSMB::Sysconfig::spool}/$spoolfile" if $spoolfile;
     }
   }

Modified: trunk/LedgerSMB/JC.pm
===================================================================
--- trunk/LedgerSMB/JC.pm	2006-10-24 02:47:46 UTC (rev 283)
+++ trunk/LedgerSMB/JC.pm	2006-10-24 03:45:40 UTC (rev 284)
@@ -310,11 +310,11 @@
   my $sth = $dbh->prepare($query);
   $sth->execute || $form->dberror($query);
 
-  my ${LedgerSMB::Sysconfig::spool}file;
+  my $spoolfile;
   my @spoolfiles = ();
 
-  while ((${LedgerSMB::Sysconfig::spool}file) = $sth->fetchrow_array) {
-    push @spoolfiles, ${LedgerSMB::Sysconfig::spool}file;
+  while (($spoolfile) = $sth->fetchrow_array) {
+    push @spoolfiles, $spoolfile;
   }
   $sth->finish;
 
@@ -327,7 +327,7 @@
   my $rc = $dbh->commit;
 
   if ($rc) {
-    foreach ${LedgerSMB::Sysconfig::spool}file (@spoolfiles) {
+    foreach $spoolfile (@spoolfiles) {
       unlink "${LedgerSMB::Sysconfig::spool}/$spoolfile" if $spoolfile;
     }
   }

Modified: trunk/LedgerSMB/OE.pm
===================================================================
--- trunk/LedgerSMB/OE.pm	2006-10-24 02:47:46 UTC (rev 283)
+++ trunk/LedgerSMB/OE.pm	2006-10-24 03:45:40 UTC (rev 284)
@@ -667,7 +667,7 @@
 
 
 sub delete {
-	my ($self, $myconfig, $form, ${LedgerSMB::Sysconfig::spool}) = @_;
+	my ($self, $myconfig, $form) = @_;
 
 	# connect to database
 	my $dbh = $form->{dbh};
@@ -680,11 +680,11 @@
 	$sth = $dbh->prepare($query);
 	$sth->execute($form->{id}) || $form->dberror($query);
 
-	my ${LedgerSMB::Sysconfig::spool}file;
+	my $spoolfile;
 	my @spoolfiles = ();
 
-	while ((${LedgerSMB::Sysconfig::spool}file) = $sth->fetchrow_array) {
-		push @spoolfiles, ${LedgerSMB::Sysconfig::spool}file;
+	while (($spoolfile) = $sth->fetchrow_array) {
+		push @spoolfiles, $spoolfile;
 	}
 	$sth->finish;
 
@@ -753,7 +753,7 @@
 	$dbh->disconnect;
 
 	if ($rc) {
-		foreach ${LedgerSMB::Sysconfig::spool}file (@spoolfiles) {
+		foreach $spoolfile (@spoolfiles) {
 			unlink "${LedgerSMB::Sysconfig::spool}/$spoolfile" if $spoolfile;
 		}
   	}


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.