summaryrefslogtreecommitdiff
path: root/LedgerSMB.pm
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-03-14 06:05:12 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-03-14 06:05:12 +0000
commit43ebbcc41b5752e054eb1d7e78f1a5de5ba275af (patch)
treee78980b6d89e3a8b95845418a823683f8be94003 /LedgerSMB.pm
parent384dbc178876688925f672690e6eabb784ce6c0d (diff)
DBObject::AUTOLOAD known to be broken. Moved other modules to use named arguments. for DBObject calls
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@897 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB.pm')
-rwxr-xr-xLedgerSMB.pm14
1 files changed, 8 insertions, 6 deletions
diff --git a/LedgerSMB.pm b/LedgerSMB.pm
index 6a929b47..ab771eb1 100755
--- a/LedgerSMB.pm
+++ b/LedgerSMB.pm
@@ -41,6 +41,7 @@ package LedgerSMB;
sub new {
+ # This will probably be the last to be revised.
my $type = shift;
@@ -81,6 +82,7 @@ sub new {
sub debug {
+ # Use Data Dumper for this one.
my ($self, $file) = @_;
@@ -97,16 +99,16 @@ sub debug {
sub escape {
- my ($self, $str, $beenthere) = @_;
+ my ($self, $str) = @_;
+ 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+)/) && !$beenthere) {
- $str = $self->escape($str, 1) if $1 == 0 && $2 < 44;
+ if (($ENV{SERVER_SIGNATURE} =~ /Apache\/2\.(\d+)\.(\d+)/)) {
+ $str =~ s/$regex/sprintf("%%%02x", ord($1))/ge
+ if $1 == 0 && $2 < 44;
}
-
- $str =~ s/([^a-zA-Z0-9_.-])/sprintf("%%%02x", ord($1))/ge;
$str;
-
}