Revision 08ca74a8
Von Moritz Bunkus vor mehr als 16 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
639 | 639 |
$main::lxdebug->leave_sub(); |
640 | 640 |
} |
641 | 641 |
|
642 |
sub ajax_response_header { |
|
643 |
$main::lxdebug->enter_sub(); |
|
644 |
|
|
645 |
my ($self) = @_; |
|
646 |
|
|
647 |
my $db_charset = $main::dbcharset ? $main::dbcharset : Common::DEFAULT_CHARSET; |
|
648 |
my $cgi = $main::cgi || CGI->new(''); |
|
649 |
my $output = $cgi->header('-charset' => $db_charset); |
|
650 |
|
|
651 |
$main::lxdebug->leave_sub(); |
|
652 |
|
|
653 |
return $output; |
|
654 |
} |
|
655 |
|
|
642 | 656 |
sub _prepare_html_template { |
643 | 657 |
$main::lxdebug->enter_sub(); |
644 | 658 |
|
bin/mozilla/ct.pl | ||
---|---|---|
566 | 566 |
$auth->assert('customer_vendor_edit'); |
567 | 567 |
|
568 | 568 |
CT->get_contact(\%myconfig, \%$form); |
569 |
print $cgi->header(), join '__pjx__', map $form->{"cp_$_"},
|
|
569 |
print $form->ajax_response_header(), join '__pjx__', map $form->{"cp_$_"},
|
|
570 | 570 |
qw(name greeting title givenname phone1 phone2 email abteilung fax mobile1 mobile2 satphone satfax project privatphone privatemail birthday used); |
571 | 571 |
$lxdebug->leave_sub(); |
572 | 572 |
|
... | ... | |
578 | 578 |
$auth->assert('customer_vendor_edit'); |
579 | 579 |
|
580 | 580 |
CT->get_shipto(\%myconfig, \%$form); |
581 |
print $cgi->header(), join '__pjx__', map $form->{"shipto$_"},
|
|
581 |
print $form->ajax_response_header(), join '__pjx__', map $form->{"shipto$_"},
|
|
582 | 582 |
qw(name department_1 department_2 street zipcode city country contact phone fax email used); |
583 | 583 |
$lxdebug->leave_sub(); |
584 | 584 |
|
... | ... | |
591 | 591 |
|
592 | 592 |
CT->get_delivery(\%myconfig, \%$form ); |
593 | 593 |
|
594 |
print $cgi->header(), $form->parse_html_template('ct/get_delivery');
|
|
594 |
print $form->ajax_response_header(), $form->parse_html_template('ct/get_delivery');
|
|
595 | 595 |
|
596 | 596 |
$lxdebug->leave_sub(); |
597 | 597 |
} |
bin/mozilla/io.pl | ||
---|---|---|
1849 | 1849 |
|
1850 | 1850 |
$form->get_duedate(\%myconfig); |
1851 | 1851 |
|
1852 |
print $cgi->header() . $form->{duedate};
|
|
1852 |
print $form->ajax_response_header() . $form->{duedate};
|
|
1853 | 1853 |
|
1854 | 1854 |
$lxdebug->leave_sub(); |
1855 | 1855 |
} |
bin/mozilla/ir.pl | ||
---|---|---|
1219 | 1219 |
sub set_duedate_vendor { |
1220 | 1220 |
$lxdebug->enter_sub(); |
1221 | 1221 |
|
1222 |
print $cgi->header(), IR->get_duedate('vendor_id' => $form->{vendor_id},
|
|
1223 |
'invdate' => $form->{invdate}, |
|
1224 |
'default' => $form->{old_duedate}); |
|
1222 |
print $form->ajax_response_header(), IR->get_duedate('vendor_id' => $form->{vendor_id},
|
|
1223 |
'invdate' => $form->{invdate},
|
|
1224 |
'default' => $form->{old_duedate});
|
|
1225 | 1225 |
|
1226 | 1226 |
$lxdebug->leave_sub(); |
1227 | 1227 |
} |
Auch abrufbar als: Unified diff
AJAX-Antworten nicht direkt $cgi->header() ausgeben, sondern über eine Funktion, die auch das Charset ausgibt.