projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
better delete customer code & warnings, delete package ability (& warning)
[freeside.git]
/
FS
/
FS
/
CGI.pm
diff --git
a/FS/FS/CGI.pm
b/FS/FS/CGI.pm
index
1e8fca6
..
85b91ea
100644
(file)
--- a/
FS/FS/CGI.pm
+++ b/
FS/FS/CGI.pm
@@
-43,7
+43,9
@@
Returns an HTML header.
=cut
sub header {
=cut
sub header {
- my($title,$menubar)=@_;
+ my($title,$menubar,$etc)=@_; #$etc is for things like onLoad= etc.
+ use Carp;
+ $etc = '' unless defined $etc;
my $x = <<END;
<HTML>
my $x = <<END;
<HTML>
@@
-52,7
+54,7
@@
sub header {
$title
</TITLE>
</HEAD>
$title
</TITLE>
</HEAD>
- <BODY BGCOLOR="#e8e8e8">
+ <BODY BGCOLOR="#e8e8e8"
$etc
>
<FONT SIZE=7>
$title
</FONT>
<FONT SIZE=7>
$title
</FONT>
@@
-121,13
+123,14
@@
Sends headers and an HTML error message, then exits.
=cut
sub eidiot {
=cut
sub eidiot {
-
#
warn "eidiot depriciated";
+ warn "eidiot depriciated";
idiot(@_);
if (exists $ENV{MOD_PERL}) {
idiot(@_);
if (exists $ENV{MOD_PERL}) {
- eval {
- use Apache;
- Apache::exit();
- };
+ $main::Response->End()
+ if defined $main::Response
+ && $main::Response->isa('Apache::ASP::Response');
+ require Apache;
+ Apache::exit();
} else {
exit;
}
} else {
exit;
}
@@
-141,8
+144,8
@@
Returns current URL with LEVEL levels of path removed from the end (default 0).
sub popurl {
my($up)=@_;
sub popurl {
my($up)=@_;
- my
($cgi)=
&FS::UID::cgi;
- my
($url)=new URI::URL $cgi->url
;
+ my
$cgi =
&FS::UID::cgi;
+ my
$url = new URI::URL ( $cgi->isa('Apache') ? $cgi->uri : $cgi->url )
;
my(@path)=$url->path_components;
splice @path, 0-$up;
$url->path_components(@path);
my(@path)=$url->path_components;
splice @path, 0-$up;
$url->path_components(@path);