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

Need help with 2.2.0 changes for "isValidated"

Quote Reply
Need help with 2.2.0 changes for "isValidated"
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]
    Subject Author Views Date
    Thread Need help with 2.2.0 changes for "isValidated" Jonze 3217 May 27, 2004, 5:58 PM
    Post Re: [Jonze] Need help with 2.2.0 changes for "isValidated"
    pugdog 3148 May 30, 2004, 4:46 PM
    Thread Re: [Jonze] Need help with 2.2.0 changes for "isValidated"
    Andy 3138 May 31, 2004, 12:49 AM
    Thread Re: [Andy] Need help with 2.2.0 changes for "isValidated"
    Jonze 3099 Jul 1, 2004, 10:27 AM
    Thread Re: [Jonze] Need help with 2.2.0 changes for "isValidated"
    Jagerman 3080 Jul 1, 2004, 3:09 PM
    Post Re: [Jagerman] Need help with 2.2.0 changes for "isValidated"
    Jonze 3067 Jul 2, 2004, 9:16 AM