I've been trying to get this fixed up in /admin/Links/User/Add.pm, but am not having much success

I'm trying to work out where it should be defined.
Code:
# We are processing an add request.
if ($IN->param('add')) {
my $results = GT::Plugins->dispatch ($CFG->{admin_root_path} . '/Plugins', 'user_add_link', \&add_link, {});
if (defined $results->{error}) {
print $IN->header();
$results->{error} .= "test";
$results->{Category} = _category_list(); print Links::SiteHTML::display ('add', $results);
}
else {
print $IN->header();
print Links::SiteHTML::display ('add_success', $results);
}
}
The part in red is the code I have added. I've alsotried modifying the
_category_list() routine, so it looks like;
Code:
sub _category_list {
# -------------------------------------------------------------------
# Return a list of all the categories.
#
my $category;
if ($CFG->{db_gen_category_list}) {
my $db = $DB->table('Links');
my $html = $DB->html($db, $IN);
my @ids = $IN->param('CatLinks.CategoryID');
if ($#ids < 1) { $ids[0] = $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;
}
I'm not quite sure why this isn't working correctly, but its being a pain in the backside :( Any suggestions are much appreciated.
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my
Amazon Wish List GLinks ULTRA Package | GLinks ULTRA Package PRO Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin |
Pre-Made Template Sets |
FREE GLinks Plugins!