Home : Products : Gossamer Links : Development, Plugins and Globals :

Products: Gossamer Links: Development, Plugins and Globals: Re: [gotze] Showing all categories a link belongs to: Edit Log

Here is the list of edits for this post
Re: [gotze] Showing all categories a link belongs to
There is a small bug in it (highlighted in red):
Code:
sub {
my ($rec) = @_;
my $id = $rec->{ID};
my $db = $DB->table ('Category','CatLinks');
my $sth = $db->select ( { 'CatLinks.LinkID' => $id }, ['Category.ID', 'Category.Full_Name'] );
my $cat;
while (my ($id,$name) = $sth->fetchrow_array) {
$name =~ s/ /_/g;
$cat .= "<a href=$CFG->{build_root_url}/$name>$name</a> ";
}
return $cat;
}


Since $cat was always overwritten (not concatenated), finally you always got displayed the last link value, only.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...

Last edited by:

webmaster33: Apr 14, 2005, 6:00 PM

Edit Log: