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

SF.net SVN: ledger-smb: [773] branches/1.2/common.pl



Revision: 773
          http://svn.sourceforge.net/ledger-smb/?rev=773&view=rev
Author:   einhverfr
Date:     2007-01-22 13:07:05 -0800 (Mon, 22 Jan 2007)

Log Message:
-----------
Removed shebang at top since this should never be called directly, and fixed bug 1624555

Modified Paths:
--------------
    branches/1.2/common.pl

Modified: branches/1.2/common.pl
===================================================================
--- branches/1.2/common.pl	2007-01-22 20:52:36 UTC (rev 772)
+++ branches/1.2/common.pl	2007-01-22 21:07:05 UTC (rev 773)
@@ -1,66 +1,65 @@
-#
-######################################################################
-# LedgerSMB Accounting and ERP
-
-# http://www.ledgersmb.org/
-#
-# Copyright (C) 2006
-# This work contains copyrighted information from a number of sources all used
-# with permission.
-#
-# This file contains source code included with or based on SQL-Ledger which
-# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed 
-# under the GNU General Public License version 2 or, at your option, any later 
-# version.  For a full list including contact information of contributors, 
-# maintainers, and copyright holders, see the CONTRIBUTORS file.
-#
-#####################################################################
-#
-# Common script handling routines for menu.pl, admin.pl, login.pl
-#
-#####################################################################
-
-use LedgerSMB::Sysconfig;
-
-sub redirect {
-	use List::Util qw(first);
-	my ($script, $argv) = split(/\?/, $form->{callback});
-
-	my @common_attrs = qw( 
-		dbh login favicon stylesheet titlebar password custom_db_fields
-		);
-
-	if (!$script){ # http redirect to login.pl if called w/no args
-		print "Location: login.pl\n";
-		print "Content-type: text/html\n\n";
-		exit;
-	}
-
-	$form->error($locale->text(__FILE__.':'.__LINE__.':'.$script.':'."Invalid Redirect"))
-		unless first {$_ eq $script} @{LedgerSMB::Sysconfig::scripts};
-
-	my %temphash;
-	for (@common_attrs){
-		$temphash{$_} = $form->{$_};
-	}
-
-	require "bin/$script";
-	undef $form;
-	$form = new Form($argv);
-
-	for (@common_attrs){
-		$form->{$_} = $temphash{$_};
-	}
-	$form->{script} = $script;
-
-	if (!$myconfig){ # needed for login
-		%myconfig = %{LedgerSMB::User->fetch_config($form->{login})};
-	}
-	if (!$form->{dbh} and ($script ne 'admin.pl')){
-		$form->db_init(\%myconfig);
-	}
-
-	&{$form->{action}};
-}
-
-1;
+######################################################################
+# LedgerSMB Accounting and ERP
+
+# http://www.ledgersmb.org/
+#
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed 
+# under the GNU General Public License version 2 or, at your option, any later 
+# version.  For a full list including contact information of contributors, 
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+#####################################################################
+#
+# Common script handling routines for menu.pl, admin.pl, login.pl
+#
+#####################################################################
+
+use LedgerSMB::Sysconfig;
+
+sub redirect {
+	use List::Util qw(first);
+	my ($script, $argv) = split(/\?/, $form->{callback});
+
+	my @common_attrs = qw( 
+		dbh login favicon stylesheet titlebar password custom_db_fields
+		);
+
+	if (!$script){ # http redirect to login.pl if called w/no args
+		print "Location: login.pl\n";
+		print "Content-type: text/html\n\n";
+		exit;
+	}
+
+	$form->error($locale->text(__FILE__.':'.__LINE__.':'.$script.':'."Invalid Redirect"))
+		unless first {$_ eq $script} @{LedgerSMB::Sysconfig::scripts};
+
+	my %temphash;
+	for (@common_attrs){
+		$temphash{$_} = $form->{$_};
+	}
+
+	undef $form;
+	$form = new Form($argv);
+	require "bin/$script";
+
+	for (@common_attrs){
+		$form->{$_} = $temphash{$_};
+	}
+	$form->{script} = $script;
+
+	if (!$myconfig){ # needed for login
+		%myconfig = %{LedgerSMB::User->fetch_config($form->{login})};
+	}
+	if (!$form->{dbh} and ($script ne 'admin.pl')){
+		$form->db_init(\%myconfig);
+	}
+
+	&{$form->{action}};
+}
+
+1;


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