summaryrefslogtreecommitdiff
path: root/LedgerSMB.pm
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-03-14 18:09:59 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-03-14 18:09:59 +0000
commitc97ad04509d3f96fd9928d88eb191f4a84808f42 (patch)
treeece75efb0694d8600882b1c18b159f99e75666fa /LedgerSMB.pm
parent43ebbcc41b5752e054eb1d7e78f1a5de5ba275af (diff)
More documentation to DBObject, changed constructor format to use named params, and consolidated conditionals in LedgerSMB::escape
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@898 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB.pm')
-rwxr-xr-xLedgerSMB.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/LedgerSMB.pm b/LedgerSMB.pm
index ab771eb1..4fe53d2e 100755
--- a/LedgerSMB.pm
+++ b/LedgerSMB.pm
@@ -103,10 +103,9 @@ sub escape {
my $regex = qr/([^a-zA-Z0-9_.-])/;
$str =~ s/$regex/sprintf("%%%02x", ord($1))/ge;
- # for Apache 2 we escape strings twice
- if (($ENV{SERVER_SIGNATURE} =~ /Apache\/2\.(\d+)\.(\d+)/)) {
- $str =~ s/$regex/sprintf("%%%02x", ord($1))/ge
- if $1 == 0 && $2 < 44;
+ # for Apache 2.0.x prior to 2.0.44 we escape strings twic;
+ if ($ENV{SERVER_SIGNATURE} =~ /Apache\/2\.0\.(\d+)/ && $1 < 44) {
+ $str =~ s/$regex/sprintf("%%%02x", ord($1))/ge;
}
$str;
}