Hi
When using the global to show new link, if the link was submit to more then one category it show the link in the page the number of time it submit. So if user submit link to 3 categories in the new link it will display 3 times the same link.
Is there a solution for this:)
The global
sub {
# Displays the Last X new links.
my $new_nr = shift;
my $search_db = $DB->table('Links');
$search_db->select_options ("ORDER BY Add_Date DESC Limit $new_nr");
my $sth = $search_db->select ( { isNew => 'Yes', isValidated => 'Yes' });
my $output;
while (my $link = $sth->fetchrow_hashref) {
$link->{'category_url'} = $CFG->{build_root_url}."/".$link->{'Full_Name'}."/";
$link->{'detailed_url'} = "$CFG->{build_detail_url}/$link->{'ID'}$CFG->{build_extension}";
$output .= Links::SiteHTML::display ('link', $link);
}
return $output;
}
When using the global to show new link, if the link was submit to more then one category it show the link in the page the number of time it submit. So if user submit link to 3 categories in the new link it will display 3 times the same link.
Is there a solution for this:)
The global
sub {
# Displays the Last X new links.
my $new_nr = shift;
my $search_db = $DB->table('Links');
$search_db->select_options ("ORDER BY Add_Date DESC Limit $new_nr");
my $sth = $search_db->select ( { isNew => 'Yes', isValidated => 'Yes' });
my $output;
while (my $link = $sth->fetchrow_hashref) {
$link->{'category_url'} = $CFG->{build_root_url}."/".$link->{'Full_Name'}."/";
$link->{'detailed_url'} = "$CFG->{build_detail_url}/$link->{'ID'}$CFG->{build_extension}";
$output .= Links::SiteHTML::display ('link', $link);
}
return $output;
}