- print STDERR "There is no $rssfile in this or parent ".
- "directories, you must create one with mkgalrss.pl\n";
- exit 1;
+ my $link;
+ my $p1;
+ my $p2;
+ for ($p1=0,$p2=length($toppath);
+ substr($feed,$p1,3) eq '../' && $p2>0;
+ $p1+=3,$p2=rindex($toppath,'/',$p2-1)) {;}
+ $link=substr($toppath,$p2);
+ $link =~ s%^/%%;
+ $link .= '/' if ($link);
+ while (($p1=index($feed,'/',$p1+1)) >= 0) {
+ $link = '../'.$link;
+ }
+
+ $rssobj->{'rss'}->channel(
+ title=>'Gallery',
+ link=>$link,
+ description=>'Gallery Feed',
+ #language=>$language,
+ #rating=>$rating,
+ #copyright=>$copyright,
+ #pubDate=>$pubDate,
+ #lastBuildDate=>$lastBuild,
+ #docs=>$docs,
+ #managingEditor=>$editor,
+ #webMaster=>$webMaster
+ );
+ $rssobj->{'rss'}->save($rssobj->{'file'});