X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fcommon.pl;h=ea34189db03b2fecef7de32206fb4b2a23c6e3f6;hb=eaf4d4830c5b449170dbef0d0ad5f88863f1e8bd;hp=18cb8907443afcf71f854d6c0df14ad59a88ab39;hpb=4826a1d124c8fede00d1c0ac9625a8e418d7978f;p=kivitendo-erp.git diff --git a/bin/mozilla/common.pl b/bin/mozilla/common.pl index 18cb89074..ea34189db 100644 --- a/bin/mozilla/common.pl +++ b/bin/mozilla/common.pl @@ -41,6 +41,28 @@ sub restore_form { $lxdebug->leave_sub(); } +sub build_std_url { + $lxdebug->enter_sub(); + + my $url = "$form->{script}?"; + my $first = 1; + foreach my $key ((qw(login password path), @_)) { + next unless ($key); + $url .= "&" unless ($first); + $first = 0; + + if ($key =~ /=/) { + $url .= $key; + } else { + $url .= "${key}=" . E($form->{$key}); + } + } + + $lxdebug->leave_sub(); + + return $url; +} + sub select_employee { $lxdebug->enter_sub(); @@ -424,6 +446,10 @@ sub Q { return $form->quote($_[0]); } +sub E { + return $form->escape($_[0]); +} + sub format_dates { $lxdebug->enter_sub();