From df073d6e09c0f87fb2e88cc215ace843a5851d4a Mon Sep 17 00:00:00 2001 From: einhverfr Date: Thu, 12 Apr 2007 20:46:20 +0000 Subject: Formatting with Perltidy git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1068 4979c152-3d1c-0410-bac9-87ea11338e46 --- admin.pl | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) (limited to 'admin.pl') diff --git a/admin.pl b/admin.pl index a3b9de31..c4ae2d48 100755 --- a/admin.pl +++ b/admin.pl @@ -9,9 +9,9 @@ # 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, +# 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. # # Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork): @@ -53,19 +53,18 @@ require "common.pl"; $| = 1; -if ($ENV{CONTENT_LENGTH}) { - read(STDIN, $_, $ENV{CONTENT_LENGTH}); +if ( $ENV{CONTENT_LENGTH} ) { + read( STDIN, $_, $ENV{CONTENT_LENGTH} ); } -if ($ENV{QUERY_STRING}) { - $_ = $ENV{QUERY_STRING}; +if ( $ENV{QUERY_STRING} ) { + $_ = $ENV{QUERY_STRING}; } -if ($ARGV[0]) { - $_ = $ARGV[0]; +if ( $ARGV[0] ) { + $_ = $ARGV[0]; } - %form = split /[&=]/; # fix for apache 2.0 bug @@ -74,7 +73,7 @@ map { $form{$_} =~ s/\\$// } keys %form; # name of this script $0 =~ tr/\\/\//; $pos = rindex $0, '/'; -$script = substr($0, $pos + 1); +$script = substr( $0, $pos + 1 ); #this needs to be a db based function #if (-e "${LedgerSMB::Sysconfig::userspath}/nologin" && $script ne 'admin.pl') { @@ -84,26 +83,26 @@ $script = substr($0, $pos + 1); # exit; #} +if ( $form{path} ) { -if ($form{path}) { - - if ($form{path} ne 'bin/lynx'){ $form{path} = 'bin/mozilla';} + if ( $form{path} ne 'bin/lynx' ) { $form{path} = 'bin/mozilla'; } - $ARGV[0] = "$_&script=$script"; - require "bin/$script"; + $ARGV[0] = "$_&script=$script"; + require "bin/$script"; -} else { +} +else { - $form{terminal} = "lynx"; + $form{terminal} = "lynx"; - if ($ENV{HTTP_USER_AGENT} !~ /lynx/i) { - $form{terminal} = "mozilla"; - } + if ( $ENV{HTTP_USER_AGENT} !~ /lynx/i ) { + $form{terminal} = "mozilla"; + } - $ARGV[0] = "path=bin/$form{terminal}&script=$script"; - map { $ARGV[0] .= "&${_}=$form{$_}" } keys %form; + $ARGV[0] = "path=bin/$form{terminal}&script=$script"; + map { $ARGV[0] .= "&${_}=$form{$_}" } keys %form; - require "bin/$script"; + require "bin/$script"; } -- cgit v1.2.3