projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
df964ba
)
bug squash
author
ivan
<ivan>
Mon, 9 Nov 1998 08:51:49 +0000
(08:51 +0000)
committer
ivan
<ivan>
Mon, 9 Nov 1998 08:51:49 +0000
(08:51 +0000)
site_perl/CGI.pm
patch
|
blob
|
history
diff --git
a/site_perl/CGI.pm
b/site_perl/CGI.pm
index
611103b
..
780f541
100644
(file)
--- a/
site_perl/CGI.pm
+++ b/
site_perl/CGI.pm
@@
-9,7
+9,7
@@
use CGI::Carp qw(fatalsToBrowser);
use FS::UID;
@ISA = qw(Exporter);
use FS::UID;
@ISA = qw(Exporter);
-@EXPORT_OK = qw(header menubar idiot eidiot url);
+@EXPORT_OK = qw(header menubar idiot eidiot
pop
url);
=head1 NAME
=head1 NAME
@@
-17,7
+17,7
@@
FS::CGI - Subroutines for the web interface
=head1 SYNOPSIS
=head1 SYNOPSIS
- use FS::CGI qw(header menubar idiot eidiot url);
+ use FS::CGI qw(header menubar idiot eidiot
pop
url);
print header( 'Title', '' );
print header( 'Title', menubar('item', 'URL', ... ) );
print header( 'Title', '' );
print header( 'Title', menubar('item', 'URL', ... ) );
@@
-25,8
+25,8
@@
FS::CGI - Subroutines for the web interface
idiot "error message";
eidiot "error message";
idiot "error message";
eidiot "error message";
- $url = url; #returns current url
- $url =
url
(3); #three levels up
+ $url =
pop
url; #returns current url
+ $url =
popurl
(3); #three levels up
=head1 DESCRIPTION
=head1 DESCRIPTION
@@
-121,18
+121,18
@@
sub eidiot {
exit;
}
exit;
}
-=item url LEVEL
+=item
pop
url LEVEL
Returns current URL with LEVEL levels of path removed from the end (default 0).
=cut
Returns current URL with LEVEL levels of path removed from the end (default 0).
=cut
-sub url {
+sub
pop
url {
my($up)=@_;
my($up)=@_;
- my($cgi)=FS::UID::cgi;
- my($url)=new URI::URL $cgi;
+ my($cgi)=
&
FS::UID::cgi;
+ my($url)=new URI::URL $cgi
->url
;
my(@path)=$url->path_components;
my(@path)=$url->path_components;
-
pop @path foreach ( 1.. $up )
;
+
splice @path, 0-$up
;
$url->path_components(@path);
$url->as_string;
}
$url->path_components(@path);
$url->as_string;
}
@@
-161,8
+161,8
@@
lose the background, eidiot ivan@sisd.com 98-sep-2
pod ivan@sisd.com 98-sep-12
$Log: CGI.pm,v $
pod ivan@sisd.com 98-sep-12
$Log: CGI.pm,v $
-Revision 1.
8 1998-11-09 08:36:05
ivan
-haha
+Revision 1.
9 1998-11-09 08:51:49
ivan
+bug squash
Revision 1.7 1998/11/09 06:10:59 ivan
added sub url
Revision 1.7 1998/11/09 06:10:59 ivan
added sub url