Hey all,
I just upgraded and have been noticing a few differences with the way Links SQL uses "isValidated". I guess with the changes made to the way Links uses "isValidated" this is to be somewhat expected. Here's a snipit from the developer changes that were posted with the announcement of 2.2.0...
Previously, a link was "viewable" in Links SQL if it had the 'isValidated' column set to 'Yes'. Due to the addition of payment support, the way to determine whether or not a link is viewable has changed, and a subroutine VIEWABLE has been added to Links.pm (it can be imported via 'use Links qw/VIEWABLE/', or via 'use Links qw/:objects/', or used directly such as Links::VIEWABLE), which returns a Condition object that should be used, such as: $DB->table('Links')->select(VIEWABLE). See the comments above the VIEWABLE subroutine in Links.pm for more complex examples.
I don't completely understand those developer changes to "isValidated". Does this mean I need to change all my globals to use the new subroutine "VIEWABLE" for them to work properly???
EX:
$sth = $search_db->select ( { isNew => 'Yes', isValidated => 'Yes' });
to
$sth = $search_db->select ( { isNew => 'Yes' } , VIEWABLE );
One other problem I'm having is that I can no longer call for all links in a category using my old method of:
http://www.mysite.com/cgi-bin/search/search.cgi?isValidated=Yes&catid=12
The example above just sends users to my advanced search page with no results. I did just happen to stumble across a quick fix for my site. Using the following does produce the desired result even though I have no idea why...
http://www.mysite.com/cgi-bin/search/search.cgi?isValidated=0&catid=12
Is it ok to use "isValidated=0" or is there a better way to make use of the new code? Why does using a value of "0" even work???
Thanks so much for any help or explaination to any of my questions!
[/url]
I just upgraded and have been noticing a few differences with the way Links SQL uses "isValidated". I guess with the changes made to the way Links uses "isValidated" this is to be somewhat expected. Here's a snipit from the developer changes that were posted with the announcement of 2.2.0...
I don't completely understand those developer changes to "isValidated". Does this mean I need to change all my globals to use the new subroutine "VIEWABLE" for them to work properly???
EX:
$sth = $search_db->select ( { isNew => 'Yes', isValidated => 'Yes' });
to
$sth = $search_db->select ( { isNew => 'Yes' } , VIEWABLE );
One other problem I'm having is that I can no longer call for all links in a category using my old method of:
http://www.mysite.com/cgi-bin/search/search.cgi?isValidated=Yes&catid=12
The example above just sends users to my advanced search page with no results. I did just happen to stumble across a quick fix for my site. Using the following does produce the desired result even though I have no idea why...
http://www.mysite.com/cgi-bin/search/search.cgi?isValidated=0&catid=12
Is it ok to use "isValidated=0" or is there a better way to make use of the new code? Why does using a value of "0" even work???
Thanks so much for any help or explaination to any of my questions!
[/url]