summaryrefslogtreecommitdiff
path: root/FS/FS/CGI.pm
diff options
context:
space:
mode:
authorjeff <jeff>2010-06-01 19:58:28 +0000
committerjeff <jeff>2010-06-01 19:58:28 +0000
commit1702ffad58949ebe9e4769afeb9fe9c93249cf69 (patch)
tree49586e879aba7be6c61a96616489b38f146c9f04 /FS/FS/CGI.pm
parent17d740b71a7f0cef5813ed494aa6f7761d889542 (diff)
add progressbar, redirection, and improve links RT#8274
Diffstat (limited to 'FS/FS/CGI.pm')
-rw-r--r--FS/FS/CGI.pm12
1 files changed, 9 insertions, 3 deletions
diff --git a/FS/FS/CGI.pm b/FS/FS/CGI.pm
index f33a718..9454784 100644
--- a/FS/FS/CGI.pm
+++ b/FS/FS/CGI.pm
@@ -227,9 +227,15 @@ sub popurl {
=cut
sub rooturl {
- # better to start with the client-provided URL
- my $cgi = &FS::UID::cgi;
- my $url_string = $cgi->isa('Apache') ? $cgi->uri : $cgi->url;
+ my $url_string;
+ if ( scalar(@_) ) {
+ $url_string = shift;
+ } else {
+ # better to start with the client-provided URL
+ my $cgi = &FS::UID::cgi;
+ $url_string = $cgi->isa('Apache') ? $cgi->uri : $cgi->url;
+ }
+
$url_string =~ s/\?.*//;
#even though this is kludgy