Home : Products : Gossamer Links : Discussions :

Products: Gossamer Links: Discussions: Re: [Andy] Hide Categories - when submitting link: Edit Log

Here is the list of edits for this post
Re: [Andy] Hide Categories - when submitting link
Hi And

1. I did not find /admin/Links/Link.pm

(I am using version LinksSQL 2.2.0 - if that matters)

I did find /admin/Link.pm

I also found /admin/Links/HTML

2. Does the sub _category_list look correct?

Code:
sub _category_list {
# -------------------------------------------------------------------
# Return a list of all the categories.
#
my $category;
$table->select( { canAdd => 'Yes' }); # Is this the right place for this?
if ($CFG->{db_gen_category_list}) {
my $db = $DB->table('Links');
my $html = $DB->html($db, $IN);
my @ids = $IN->param('CatLinks.CategoryID') || $IN->param('ID');
$category = $html->get_all_categories(\@ids, 'CatLinks.CategoryID', 1);
}
else {
my $db = $DB->table('Category');
my $id = $IN->param('CatLinks.CategoryID') || $IN->param('ID');
my $sth = $db->select( { ID => $id }, ['Full_Name'] );
my ($name) = $sth->fetchrow_array();
if ($name) {
$category = "$name <input type=hidden name='CatLinks.CategoryID' value='$id'>";
}
else {
return;
}
}
return $category;
}

Thanks, And Smile

------------------------------------------

Last edited by:

DogTags: May 19, 2004, 7:35 AM

Edit Log: