Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Editors and link_validate_date

Quote Reply
Editors and link_validate_date
We have just started to use the editors system to help us manage our link submissions.

Our site is setup so that link_validate_date in the setup options is the current date, and not the original date when the link was submitted. When an editor validates a link, the Add_Date/Mod_Date fields both show the current date, but only the Mod_Date is stored correctly in the database - the Add_Date stays as it was originally.

This only occurs when editors validate links, not administrators. If anyone else is using the editor system I would appreciate any feedback on how this works for them - I may be wrong but it looks like a possible bug to me.
Quote Reply
Re: [aus_dave] Editors and link_validate_date In reply to
Looks like not many people are using the editors feature...

I have confirmed this problem on another Links install - if someone from GT can comment on this issue it would be appreciated.
Quote Reply
Re: [aus_dave] Editors and link_validate_date In reply to
Yeah, it's missing the chunk of code that handles that. I need to go through and check that there aren't other things missing from that bit of code, but I've been a little short on time these days Unsure.

Adrian
Quote Reply
Re: [brewt] Editors and link_validate_date In reply to
OK - good to know it's a bug and not me hacking the site too much Laugh. Would be great if this can be addressed in an update soon but I appreciate the lack of time and minor nature of the bug.

While you are at it, it would be good to add the ID number to the editor validate page as well. One of our editors picked this up - other than the validate link used to get to the page, the ID number doesn't appear anywhere (would be nice to have it at the top of the page as in the admin backend).
Quote Reply
Re: [aus_dave] Editors and link_validate_date In reply to
Adrian, just wondering if there is an ETA for this to be addressed in an update - we are looking to add more editors on our site but we are holding off until this is fixed.
Quote Reply
Re: [aus_dave] Editors and link_validate_date In reply to
Sorry about the delay, I've been working 12-16 hour days for the past month on this current project so I haven't had a chance to really work on anything else. This is on my todo list and once the project finishes up (should be finished by the end of the week), I'll get to it.

Adrian
Quote Reply
Re: [brewt] Editors and link_validate_date In reply to
Sorry Dave, but this project is taking a little longer than expected. So for now, this patch should solve your problems:
Code:
--- Links/Browser.pm 8 Feb 2008 21:41:57 -0000 1.124
+++ Links/Browser.pm 22 Apr 2008 05:52:54 -0000
@@ -1661,6 +1661,12 @@
$link_info = $links->get({ ID => $link_id })
or return $self->javascript_error ( message => Links::language('BROWSER_INVALIDLINKID', $link_id), hist_go => -1 );
}
+
+# Set Add_Date/Mod_Date, so if the link gets validated, it gets set to the current date.
+ my $today = GT::Date::date_get();
+ $link_info->{Add_Date} = $today if $CFG->{link_validate_date};
+ $link_info->{Mod_Date} = $today;
+
my $h = $DB->html($links, $link_info);

my $form = $h->form({

Adrian
Quote Reply
Re: [brewt] Editors and link_validate_date In reply to
Thanks a lot Adrian, just gave it a quick test and it works perfectly Wink.