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

add.cgi problem (link not added to catlinks table)

Quote Reply
add.cgi problem (link not added to catlinks table)
I'm almost sure it is not bug, because many of you are using LSQL link add without problems... But something is strange.
My problem is, that I add a link to the DB, it is not added to the catlinks table.

Could somebody tell me, where & how the link is added to catlinks table?

I feel something is wrong... When I add a link to the DB, it is not added to the catlinks table (LSQL v2.1.1).

In Add.pm/add_link function:
Code:
# Validate the form input..
my $db = $DB->table ('Links');
my $cdb = $DB->table ('Category');
my $cat_links = $DB->table ('CatLinks');
$db is used. $cdb is used.
BUT $cat_links is never used!

There should be a line in Add.pm/add_link function, similar to this:
$CatLinks->insert({ LinkID => $link_id, CategoryID => $cat_id });

But there is not. Shocked
Anybody knows or has idea, where the link category id is added to the 'CatLinks' table? (within Add.pm)

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...
Quote Reply
Re: [webmaster33] add.cgi problem (link not added to catlinks table) In reply to
It's in admin/Links/Link.pm, sub add, which is called when is says $db->add. Or in other words, Links::Link subclasses GT::SQL::Table.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] add.cgi problem (link not added to catlinks table) In reply to
Ok. I see now. Thanks!

Then in Add.pm/add_link function:
Code:
my $cat_links = $DB->table ('CatLinks');
this line is unnecessary.

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...