Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Error: Edit Bookmark Folder Glinks

Quote Reply
Error: Edit Bookmark Folder Glinks
Hi,

I've turned up an error with Glinks install 3.0.4.

If you enter whitespace and no other value in the Edit Folder text field (name="my_folder_name") - for example ' ' or ' ' etc. as the full value it currently returns a fatal error.

Where as if you try entering a whitespace only value in the Add Folder form it returns a BOOKMARK_BAD_FOLDER error.



Comedy Quotes - Glinks 3.3.0, PageBuilder, StaticURLtr, CAPTCHA, User_Edit_Profile

Quote Reply
Re: [Chas-a] Error: Edit Bookmark Folder Glinks In reply to
Oops, if you go to that line in the code, it shouldn't be dying there. Just remove the "or die ..." part of that line. I also noticed another bug is that 7 lines down, it should be 'bookmark_folder_edit' not 'bookmark_folder_add'.

Adrian

Last edited by:

brewt: Feb 7, 2006, 12:10 PM
Quote Reply
Re: [brewt] Error: Edit Bookmark Folder Glinks In reply to
Hi Adrian,

To confirm I need to edit the folder_edit sub from:

Code:
$args->{my_folder_user_username_fk} = $USER->{Username};
$args->{my_folder_public} = $args->{my_folder_public} ? 1 : 0;
$args->{my_folder_default} = $args->{my_folder_default} ? 1 : 0;
if ($args->{my_folder_default}) {
$bf->update({ my_folder_default => 0 }, { my_folder_user_username_fk => $USER->{Username}, my_folder_default => 1 });
}
my $rec = $bf->modify($args) or die "$GT::SQL::error";

to

Code:
$args->{my_folder_user_username_fk} = $USER->{Username};
$args->{my_folder_public} = $args->{my_folder_public} ? 1 : 0;
$args->{my_folder_default} = $args->{my_folder_default} ? 1 : 0;
if ($args->{my_folder_default}) {
$bf->update({ my_folder_default => 0 }, { my_folder_user_username_fk => $USER->{Username}, my_folder_default => 1 });
}
my $rec = $bf->modify($args);

Is that correct?



Comedy Quotes - Glinks 3.3.0, PageBuilder, StaticURLtr, CAPTCHA, User_Edit_Profile

Quote Reply
Re: [Chas-a] Error: Edit Bookmark Folder Glinks In reply to
Yes, that's right.

Adrian