kludge around it completely
[freeside.git] / FS / FS / CGI.pm
index 86d20f6..905189e 100644 (file)
@@ -44,8 +44,10 @@ Returns an HTML header.
 =cut
 
 sub header {
+  use Carp;
+  carp 'FS::CGI::header deprecated; include /elements/header.html instead';
+
   my($title,$menubar,$etc)=@_; #$etc is for things like onLoad= etc.
-  #use Carp;
   $etc = '' unless defined $etc;
 
   my $x =  <<END;
@@ -107,6 +109,9 @@ Returns an HTML menubar.
 =cut
 
 sub menubar { #$menubar=menubar('Main Menu', '../', 'Item', 'url', ... );
+  use Carp;
+  carp 'FS::CGI::menubar deprecated; include /elements/menubar.html instead';
+
   my($item,$url,@html);
   while (@_) {
     ($item,$url)=splice(@_,0,2);
@@ -209,7 +214,9 @@ Returns current URL with LEVEL levels of path removed from the end (default 0).
 sub popurl {
   my($up)=@_;
   my $cgi = &FS::UID::cgi;
-  my $url = new URI::URL ( $cgi->isa('Apache') ? $cgi->uri : $cgi->url );
+  my $url_string = $cgi->isa('Apache') ? $cgi->uri : $cgi->url;
+  $url_string =~ s/\?.*//;
+  my $url = new URI::URL ( $url_string );
   my(@path)=$url->path_components;
   splice @path, 0-$up;
   $url->path_components(@path);
@@ -225,6 +232,9 @@ Returns HTML tag for beginning a table.
 =cut
 
 sub table {
+  use Carp;
+  carp 'FS::CGI::table deprecated; include /elements/table.html instead';
+
   my $col = shift;
   if ( $col ) {
     qq!<TABLE BGCOLOR="$col" BORDER=1 WIDTH="100%" CELLSPACING=0 CELLPADDING=2 BORDERCOLOR="#999999">!;