[Bio] / FigKernelPackages / HTML.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/HTML.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.64, Sat Oct 8 14:14:47 2005 UTC revision 1.75, Fri Dec 23 18:13:45 2005 UTC
# Line 1  Line 1 
1    #
2    # Copyright (c) 2003-2006 University of Chicago and Fellowship
3    # for Interpretations of Genomes. All Rights Reserved.
4    #
5    # This file is part of the SEED Toolkit.
6    #
7    # The SEED Toolkit is free software. You can redistribute
8    # it and/or modify it under the terms of the SEED Toolkit
9    # Public License.
10    #
11    # You should have received a copy of the SEED Toolkit Public License
12    # along with this program; if not write to the University of Chicago
13    # at info@ci.uchicago.edu or the Fellowship for Interpretation of
14    # Genomes at veronika@thefig.info or download a copy from
15    # http://www.theseed.org/LICENSE.TXT.
16    #
17    
18  package HTML;  package HTML;
19    
20  use Tracer;  use Tracer;
# Line 12  Line 29 
29  use POSIX;  use POSIX;
30    
31    
32    my $top_link_cache;
33    
34    
35  sub new  sub new
36  {  {
37      my($class) = @_;      my($class) = @_;
# Line 21  Line 41 
41      return bless $self, $class;      return bless $self, $class;
42  }  }
43    
44    sub top_link
45    {
46    
47        #
48        # Determine if this is a toplevel cgi or one in one of the subdirs (currently
49        # just /p2p).
50        #
51    
52        return $top_link_cache if ($top_link_cache);
53    
54        my @parts = split(/\//, $ENV{SCRIPT_NAME});
55        my $top;
56        if ($parts[-2] eq 'FIG')
57        {
58            $top = '.';
59    #       warn "toplevel @parts\n";
60        }
61        elsif ($parts[-3] eq 'FIG')
62        {
63            $top = '..';
64    #       warn "subdir @parts\n";
65        }
66        else
67        {
68            $top = $FIG_Config::cgi_base;
69    #       warn "other @parts\n";
70        }
71    
72        $top_link_cache = $top;
73        return $top;
74    }
75    
76  sub compute_html_header  sub compute_html_header
77  {  {
78      shift if UNIVERSAL::isa($_[0],__PACKAGE__);      shift if UNIVERSAL::isa($_[0],__PACKAGE__);
# Line 36  Line 88 
88      }      }
89      my @html_hdr = &FIG::file_read($html_hdr_file);      my @html_hdr = &FIG::file_read($html_hdr_file);
90    
91      $options{no_fig_search} or push( @html_hdr, "<br><a href=\"index.cgi?user=$user\">FIG search</a>\n" );      # for my $k (sort keys %ENV) { warn "$k = $ENV{$k}\n"; }
92    
93        #
94        # Determine if this is a toplevel cgi or one in one of the subdirs (currently
95        # just /p2p).
96        #
97    
98        my @parts = split(/\//, $ENV{SCRIPT_NAME});
99        my $top;
100        if ($parts[-2] eq 'FIG')
101        {
102            $top = '.';
103    #       warn "toplevel @parts\n";
104        }
105        elsif ($parts[-3] eq 'FIG')
106        {
107            $top = '..';
108    #       warn "subdir @parts\n";
109        }
110        else
111        {
112            $top = $FIG_Config::cgi_base;
113    #       warn "other @parts\n";
114        }
115    
116        $options{no_fig_search} or push( @html_hdr, "<br><a href=\"$top/index.cgi?user=$user\">FIG search</a>\n" );
117    
118      if (@html_hdr)      if (@html_hdr)
119      {      {
# Line 64  Line 141 
141    
142          for $_ (@html_hdr)          for $_ (@html_hdr)
143          {          {
144              s,(href|img\s+src)="/FIG/,\1="$FIG_Config::cgi_base,g;              s,(href|img\s+src)="/FIG/,$1="$top/,g;
145              s,(\?user\=)\",$1$user",;              s,(\?user\=)\",$1$user",;
146              if ($_ eq "<!-- HEADER_INSERT -->\n")              if ($_ eq "<!-- HEADER_INSERT -->\n")
147              {              {
# Line 82  Line 159 
159      my($cgi,$html,$no_home, $alt_header, $css, $javasrc, $cookie) = @_;      my($cgi,$html,$no_home, $alt_header, $css, $javasrc, $cookie) = @_;
160      my $i;      my $i;
161    
162        my $top = top_link();
163    
164      # ARGUMENTS:      # ARGUMENTS:
165      #     $cgi is the CGI method      #     $cgi is the CGI method
166      #     $html is an array with all the html in it. It is just joined by "\n" (and not <br> or <p>      #     $html is an array with all the html in it. It is just joined by "\n" (and not <br> or <p>
# Line 181  Line 260 
260          if ( $html->[$i] =~ /\<body[^0-9a-z]/i )          if ( $html->[$i] =~ /\<body[^0-9a-z]/i )
261          {          {
262              $body_line = $i;              $body_line = $i;
263              $last;              last;
264          }          }
265    
266          #  Now the general case.          #  Now the general case.
# Line 280  Line 359 
359    
360      if (!$css || !$css->{'Default'})      if (!$css || !$css->{'Default'})
361      {      {
362         $css->{'Default'} = &FIG::cgi_url() . "/Html/css/default.css";         $css->{'Default'} = "$top/Html/css/default.css";
363      }      }
364      if (!$css->{"Sans Serif"})      if (!$css->{"Sans Serif"})
365      {      {
366         $css->{'Sans Serif'} = &FIG::cgi_url() . "/Html/css/sanserif.css";         $css->{'Sans Serif'} = "$top/Html/css/sanserif.css";
367      }      }
368    
369      my $csstext = "<link rel='stylesheet' title='default' href='".$css->{'Default'}."' type='text/css'>\n";      my $csstext = "<link rel='stylesheet' title='default' href='".$css->{'Default'}."' type='text/css'>\n";
# Line 296  Line 375 
375         $csstext .= "<link rel='alternate stylesheet' title='$k' href='".$css->{$k}."' type='text/css'>\n";         $csstext .= "<link rel='alternate stylesheet' title='$k' href='".$css->{$k}."' type='text/css'>\n";
376      }      }
377    
378      $csstext   .= "<link rel='alternate'  title='SEED RSS feeds' href='".&FIG::cgi_url()."/Html/rss/SEED.rss' type='application/rss+xml'>\n";      $csstext   .= "<link rel='alternate'  title='SEED RSS feeds' href='$top/Html/rss/SEED.rss' type='application/rss+xml'>\n";
379    
380      # RAE: also added support for external javascripts here.      # RAE: also added support for external javascripts here.
381      # we are cluttering the HTML code with all the javascripts when they could easily be in external files      # we are cluttering the HTML code with all the javascripts when they could easily be in external files
# Line 306  Line 385 
385      # it will reduce our overhead.      # it will reduce our overhead.
386    
387      # $javasrc must be a ref to an array with urls (absolute or relative) to the javascripts      # $javasrc must be a ref to an array with urls (absolute or relative) to the javascripts
388      push @$javasrc, &FIG::cgi_url() . "/Html/css/FIG.js";      push @$javasrc, "$top/Html/css/FIG.js";
389      foreach my $script (@$javasrc) {      foreach my $script (@$javasrc) {
390          $csstext .= "<script src=\"$script\" type=\"text/javascript\"></script>\n";          $csstext .= "<script src=\"$script\" type=\"text/javascript\"></script>\n";
391      }      }
# Line 442  Line 521 
521    
522      my $border = defined $options{border} ? "border=\"$options{border}\"" : "border";      my $border = defined $options{border} ? "border=\"$options{border}\"" : "border";
523      my $width = defined $options{width} ? "width=\"$options{width}\"" : undef;      my $width = defined $options{width} ? "width=\"$options{width}\"" : undef;
524      push( @tab, "\n<table $border $width>\n",      my $class = defined $options{class} ? "class=\"$options{class}\"" : undef;
525        push( @tab, "\n<table $border $width $class>\n",
526                  "\t<caption><b>$title</b></caption>\n",                  "\t<caption><b>$title</b></caption>\n",
527                  "\t<tr>\n\t\t"                  "\t<tr>\n\t\t"
528                . join( "\n", map { &expand($_, "th") } @$col_hdrs )                . join( "\n", map { &expand($_, "th") } @$col_hdrs )
# Line 462  Line 542 
542      return join("",@tab);      return join("",@tab);
543  }  }
544    
545    sub abstract_coupling_table {
546        my($cgi,$prot,$coupling) = @_;
547    
548        my $col_hdrs = ["coupled to","Score","Type of Coupling", "Type-specific Data"];
549        my $tab = [];
550        foreach my $x (@$coupling)
551        {
552            my($peg2,$psc,$type,$extra) = @$x;
553            push(@$tab,[&fid_link($cgi,$peg2,1),$psc,$type,&set_prot_links($cgi,join(", ",@$extra))]);
554        }
555    
556        my $help = "<a href=\"Html/abstract_coupling.html\" target=\"SEED_or_SPROUT_help\">for help</a>";
557    #    my @html = &make_table($col_hdrs,$tab,"Abstract Coupling Data for $prot");
558    #    push(@html,"<hr>\n",$cgi->h3($help),"<br>");
559    #    return @html;
560    
561        return &make_table($col_hdrs,$tab,"Abstract Coupling Data for $prot [$help]");
562    }
563    
564  sub expand {  sub expand {
565      shift if UNIVERSAL::isa($_[0],__PACKAGE__);      shift if UNIVERSAL::isa($_[0],__PACKAGE__);
566      my( $x, $tag ) = @_;      my( $x, $tag ) = @_;
# Line 670  Line 769 
769      my($cgi,$fid,$local,$just_url) = @_;      my($cgi,$fid,$local,$just_url) = @_;
770      my($n);      my($n);
771    
772        my $top = top_link();
773    
774      if ($fid =~ /^fig\|\d+\.\d+\.([a-z]+)\.(\d+)/)      if ($fid =~ /^fig\|\d+\.\d+\.([a-z]+)\.(\d+)/)
775      {      {
776          if ($local)          if ($local)
# Line 695  Line 796 
796             my $user = $cgi->param('user');             my $user = $cgi->param('user');
797             if (! $user) { $user = "" }             if (! $user) { $user = "" }
798             my $sprout = $cgi->param('SPROUT') ? "&SPROUT=1" : "";             my $sprout = $cgi->param('SPROUT') ? "&SPROUT=1" : "";
799             $link = &FIG::cgi_url . "/feature.cgi?feature=$fid&user=$user$trans$sprout";             $link = "$top/feature.cgi?feature=$fid&user=$user$trans$sprout";
800             $link =~ s/[a-z_A-Z0-9]+\.cgi\?/feature.cgi?/;             $link =~ s/[a-z_A-Z0-9]+\.cgi\?/feature.cgi?/;
801          }          }
802          else          else
# Line 715  Line 816 
816    
817              #if (! $cgi_url) { $cgi_url = &FIG::cgi_url }              #if (! $cgi_url) { $cgi_url = &FIG::cgi_url }
818              #$link = $cgi_url . "/protein.cgi?prot=$fid&user=$user$trans$sprout";              #$link = $cgi_url . "/protein.cgi?prot=$fid&user=$user$trans$sprout";
819              $link = "protein.cgi?prot=$fid&user=$user$trans$sprout";              $link = "$top/protein.cgi?prot=$fid&user=$user$trans$sprout";
820              $link =~ s/[a-z_A-Z0-9]+\.cgi\?/protein.cgi?/;              $link =~ s/[a-z_A-Z0-9]+\.cgi\?/protein.cgi?/;
             #  
             # Elimin the p2p part if we're in that subdir. Ugh.  
             #  
             $link =~ s,p2p/protein.cgi,protein.cgi,;  
821          }          }
822          if ($just_url)          if ($just_url)
823          {          {
# Line 857  Line 954 
954          $after = $3;          $after = $3;
955          return &set_prot_links($cgi,$before) . &HTML::fid_link($cgi,$match) . &set_prot_links($cgi,$after);          return &set_prot_links($cgi,$before) . &HTML::fid_link($cgi,$match) . &set_prot_links($cgi,$after);
956      }      }
957      elsif ($x =~ /^(.*)\b([NXYZA]P_[0-9\.]+)\b(.*)/s)      elsif ($x =~ /^(.*)\b([NXYZA][PM]_[0-9\.]+)\b(.*)/s)
958      {      {
959          $before = $1;          $before = $1;
960          $match = $2;          $match = $2;
# Line 906  Line 1003 
1003          $after = $3;          $after = $3;
1004          return &set_prot_links($cgi,$before) . &HTML::kegg_link($cgi,$match) . &set_prot_links($cgi,$after);          return &set_prot_links($cgi,$before) . &HTML::kegg_link($cgi,$match) . &set_prot_links($cgi,$after);
1005      }      }
1006        elsif ($x =~ /^(.*)(Ensembl[a-zA-Z]+:[a-zA-Z_0-9\.]+)(.*)/s)
1007        {
1008            $before = $1;
1009            $match = $2;
1010            $after = $3;
1011            return &set_prot_links($cgi,$before) . &HTML::ensembl_link($cgi,$match) . &set_prot_links($cgi,$after);
1012        }
1013        elsif ($x =~ /^(.*)(EntrezGene:[a-zA-Z_0-9\.]+)(.*)/s)
1014        {
1015            $before = $1;
1016            $match = $2;
1017            $after = $3;
1018            return &set_prot_links($cgi,$before) . &HTML::entrezgene_link($cgi,$match) . &set_prot_links($cgi,$after);
1019        }
1020        elsif ($x =~ /^(.*)(MIM:[a-zA-Z_0-9\.]+)(.*)/s)
1021        {
1022            $before = $1;
1023            $match = $2;
1024            $after = $3;
1025            return &set_prot_links($cgi,$before) . &HTML::mim_link($cgi,$match) . &set_prot_links($cgi,$after);
1026        }
1027        elsif ($x =~ /^(.*)(UniGene:[a-zA-Z_0-9\.]+)(.*)/s)
1028        {
1029            $before = $1;
1030            $match = $2;
1031            $after = $3;
1032            return &set_prot_links($cgi,$before) . &HTML::unigene_link($cgi,$match) . &set_prot_links($cgi,$after);
1033        }
1034        elsif ($x =~ /^(.*)(IPI:[a-zA-Z_0-9\.]+)(.*)/s)
1035        {
1036            $before = $1;
1037            $match = $2;
1038            $after = $3;
1039            return &set_prot_links($cgi,$before) . &HTML::ipi_link($cgi,$match) . &set_prot_links($cgi,$after);
1040        }
1041        elsif ($x =~ /^(.*)(WP:[a-zA-Z_0-9\.]+)(.*)/s)
1042        {
1043            #wormbase
1044    
1045            $before = $1;
1046            $match = $2;
1047            $after = $3;
1048            return &set_prot_links($cgi,$before) . &HTML::wp_link($cgi,$match) . &set_prot_links($cgi,$after);
1049        }
1050        elsif ($x =~ /^(.*)(FB:[a-zA-Z_0-9\.]+)(.*)/s)
1051        {
1052            #flybase
1053    
1054            $before = $1;
1055            $match = $2;
1056            $after = $3;
1057            return &set_prot_links($cgi,$before) . &HTML::fb_link($cgi,$match) . &set_prot_links($cgi,$after);
1058        }
1059        elsif ($x =~ /^(.*)(FlyBaseORFNames:[a-zA-Z_0-9\.]+)(.*)/s)
1060        {
1061            #flybase
1062    
1063            $before = $1;
1064            $match = $2;
1065            $after = $3;
1066            return &set_prot_links($cgi,$before) . &HTML::fborf_link($cgi,$match) . &set_prot_links($cgi,$after);
1067        }
1068        elsif ($x =~ /^(.*)(SGD_LOCUS:[a-zA-Z_0-9\.]+)(.*)/s)
1069        {
1070            #flybase
1071    
1072            $before = $1;
1073            $match = $2;
1074            $after = $3;
1075            return &set_prot_links($cgi,$before) . &HTML::sgd_link($cgi,$match) . &set_prot_links($cgi,$after);
1076        }
1077      return $x;      return $x;
1078  }  }
1079    
# Line 917  Line 1085 
1085      {      {
1086          return "<a href=http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=protein&cmd=search&term=$id>$id</a>";          return "<a href=http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=protein&cmd=search&term=$id>$id</a>";
1087      }      }
1088        elsif ($id =~ /^[NXYZA]M_/)
1089        {
1090            return "<a href=http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=nuccore&cmd=search&term=$id>$id</a>";
1091        }
1092  }  }
1093    
1094  sub gi_link {  sub gi_link {
# Line 985  Line 1157 
1157      return $kegg;      return $kegg;
1158  }  }
1159    
1160    sub ensembl_link {
1161        shift if UNIVERSAL::isa($_[0],__PACKAGE__);
1162        my($cgi,$ensembl) = @_;
1163    
1164        if ($ensembl =~ /^(\S+):(\S+)$/)
1165        {
1166            my $what=$1;
1167            my $key=$2;
1168            my $idx="all";
1169            if ($what eq "EnsemblGene") { $idx = "Gene" }
1170            if ($what eq "EnsemblTranscript") { $idx = "all" }
1171            if ($what eq "EnsemblProtein") { $idx = "all" }
1172    
1173            #I really want to get right to the transcript and peptide pages, but
1174            #can't see how to do that without knowing the org name too, which
1175            #I don't know at this point. (ensembl org name, not real org name)
1176    
1177            return "<a href=http://www.ensembl.org/Homo_sapiens/textview?species=all&idx=$idx&q=$key>$ensembl</a>";
1178        }
1179        return $ensembl;
1180    }
1181    
1182    sub entrezgene_link {
1183        shift if UNIVERSAL::isa($_[0],__PACKAGE__);
1184        my($cgi,$entrezgene) = @_;
1185    
1186        if ($entrezgene =~ /^EntrezGene:(\S+)$/)
1187        {
1188            return "<a href=http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=gene&cmd=Retrieve&dopt=full_report&list_uids=$1>$entrezgene</a>";
1189        }
1190        return $entrezgene;
1191    }
1192    
1193    sub mim_link {
1194        shift if UNIVERSAL::isa($_[0],__PACKAGE__);
1195        my($cgi,$mim) = @_;
1196    
1197        if ($mim =~ /^MIM:(\S+)$/)
1198        {
1199            return "<a href=http://www3.ncbi.nlm.nih.gov/entrez/dispomim.cgi?id=$1>$mim</a>";
1200        }
1201        return $mim;
1202    }
1203    
1204    sub unigene_link {
1205        shift if UNIVERSAL::isa($_[0],__PACKAGE__);
1206        my($cgi,$unigene) = @_;
1207    
1208        if ($unigene =~ /^UniGene:(\S+)$/)
1209        {
1210            return "<a href=http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=unigene&cmd=search&term=$1>$unigene</a>";
1211        }
1212        return $unigene;
1213    }
1214    
1215    sub ipi_link {
1216        shift if UNIVERSAL::isa($_[0],__PACKAGE__);
1217        my($cgi,$ipi) = @_;
1218    
1219        if ($ipi =~ /^IPI:(\S+)$/)
1220        {
1221            return "<a href=http://srs.ebi.ac.uk/srsbin/cgi-bin/wgetz?-id+AEoS1R8Jnn+-e+[IPI:\'$1\']+-qnum+1+-enum+1>$ipi</a>";
1222        }
1223        return $ipi;
1224    }
1225    
1226    sub wp_link {
1227        shift if UNIVERSAL::isa($_[0],__PACKAGE__);
1228        my($cgi,$wp) = @_;
1229    
1230        #wormbase
1231    
1232        if ($wp =~ /^WP:(\S+)$/)
1233        {
1234            return "<a href=http://www.wormbase.org/db/searches/basic?class=Any&query=$1&Search=Search>$wp</a>";
1235        }
1236        return $wp;
1237    }
1238    
1239    sub fb_link {
1240        shift if UNIVERSAL::isa($_[0],__PACKAGE__);
1241        my($cgi,$fb) = @_;
1242    
1243        #flybase
1244    
1245        if ($fb =~ /^FB:(\S+)$/)
1246        {
1247            return "<a href=http://flybase.bio.indiana.edu/.bin/fbidq.html?$1>$fb</a>";
1248        }
1249        return $fb;
1250    }
1251    
1252    sub fborf_link {
1253        shift if UNIVERSAL::isa($_[0],__PACKAGE__);
1254        my($cgi,$fb) = @_;
1255    
1256        #flybase
1257    
1258        if ($fb =~ /^FlyBaseORFNames:(\S+)$/)
1259        {
1260            return "<a href=http://flybase.bio.indiana.edu/.bin/fbidq.html?$1>$fb</a>";
1261        }
1262        return $fb;
1263    }
1264    
1265    sub sgd_link {
1266        shift if UNIVERSAL::isa($_[0],__PACKAGE__);
1267        my($cgi,$sgd) = @_;
1268    
1269        #yeast
1270    
1271        if ($sgd =~ /^SGD_LOCUS:(\S+)$/)
1272        {
1273            return "<a href=http://db.yeastgenome.org/cgi-bin/locus.pl?locus=$1>$sgd</a>";
1274        }
1275        return $sgd;
1276    }
1277    
1278    
1279    
1280    
1281  sub set_map_links {  sub set_map_links {
1282      shift if UNIVERSAL::isa($_[0],__PACKAGE__);      shift if UNIVERSAL::isa($_[0],__PACKAGE__);
1283      my($cgi,$x) = @_;      my($cgi,$x) = @_;
# Line 1002  Line 1295 
1295      return $x;      return $x;
1296  }  }
1297    
1298    
1299    
1300  sub map_link {  sub map_link {
1301      shift if UNIVERSAL::isa($_[0],__PACKAGE__);      shift if UNIVERSAL::isa($_[0],__PACKAGE__);
1302      my($cgi,$map,$org) = @_;      my($cgi,$map,$org) = @_;
# Line 1104  Line 1399 
1399  title       : the title. This is usually what is seen by the user in the pull down menu  title       : the title. This is usually what is seen by the user in the pull down menu
1400  description : a more complete description that is often seen is rss viewers but not always  description : a more complete description that is often seen is rss viewers but not always
1401  link        : link to the item that was added/edited  link        : link to the item that was added/edited
1402  All other keys are treated as optional RSS arguments and written to the file. At most, 10 recent entries are stored in the rss file.  All other keys are treated as optional RSS arguments and written to the file.
1403    
1404    At most, $max_entries recent entries are stored in the rss file, and this is currently 50.
1405    
1406  RSS files are quite simple, and contain some standard header information, and then individual items surrounded by an <item> </item> tag. Note that there is also an initial title/description/link set that describes the file.  RSS files are quite simple, and contain some standard header information, and then individual items surrounded by an <item> </item> tag. Note that there is also an initial title/description/link set that describes the file.
1407    
# Line 1114  Line 1411 
1411  sub rss_feed {  sub rss_feed {
1412   shift if UNIVERSAL::isa($_[0],__PACKAGE__);   shift if UNIVERSAL::isa($_[0],__PACKAGE__);
1413   my ($files, $args)=@_;   my ($files, $args)=@_;
1414    
1415     # how many entries to store in the file
1416     my $max_entries=50;
1417    
1418   foreach my $a (keys %$args) {if ($a =~ /^-(.*)/) {my $b=$1; $args->{$b}=$args->{$a}; delete $args->{$a}}}   foreach my $a (keys %$args) {if ($a =~ /^-(.*)/) {my $b=$1; $args->{$b}=$args->{$a}; delete $args->{$a}}}
1419    
1420   my $filepath=$FIG_Config::fig."/CGI/Html/rss";   my $filepath=$FIG_Config::fig."/CGI/Html/rss";
# Line 1127  Line 1428 
1428     {     {
1429          title           => "The SEED",          title           => "The SEED",
1430          description     => "Latest news from the SEED",          description     => "Latest news from the SEED",
1431          link            => &FIG::cgi_url()."/Html/rss/SEED.rss",          link            => "Html/rss/SEED.rss",
1432     },     },
1433    
1434    "SEEDsubsystems.rss" =>    "SEEDsubsystems.rss" =>
1435    {    {
1436          title           => "SEED Subsystems",          title           => "SEED Subsystems",
1437          description     => "Recently updated SEED subsystems",          description     => "Recently updated SEED subsystems",
1438          link            => &FIG::cgi_url()."/Html/rss/SEEDsubsystems.rss",          link            => "Html/rss/SEEDsubsystems.rss",
1439    },    },
1440    
1441    "SEEDsubsystems.rss" =>    "SEEDsubsystems.rss" =>
# Line 1159  Line 1460 
1460    if ($qw eq "link")    if ($qw eq "link")
1461    {    {
1462     $args->{$qw} =~ /^(.*?\.cgi.)(.*)$/;     $args->{$qw} =~ /^(.*?\.cgi.)(.*)$/;
    print STDERR "Got ->>$1<<- and ->>$2<<-\n";  
1463     $args->{$qw} = $1.uri_escape($2) if ($1 && $2);     $args->{$qw} = $1.uri_escape($2) if ($1 && $2);
1464    }    }
1465    
# Line 1193  Line 1493 
1493       $itemcount++;       $itemcount++;
1494       $initem=1;       $initem=1;
1495      }      }
1496      if (/\<\/item\>/) {$initem=0; next if ($itemcount > 9)}      if (/\<\/item\>/) {$initem=0; next if ($itemcount > $max_entries)}
1497      next if ($initem && $itemcount > 9);      next if ($initem && $itemcount > $max_entries);
1498      push @out, $_;      push @out, $_;
1499     }     }
1500     close IN;     close IN;

Legend:
Removed from v.1.64  
changed lines
  Added in v.1.75

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3