photo_album::search::photo::datasource (private)

 photo_album::search::photo::datasource photo_id

Defined in packages/photo-album/tcl/photo-album-search-procs.tcl

return the indexable content for an album. can index a revision_id or a cr_item.item_id for photo_album

Parameters:
photo_id - the item_id or revision id to index.
Author:
Jeff Davis davis@xarg.net
Created:
2004-06-01

Partial Call Graph (max 5 caller/called nodes):
%3 AcsSc.ftscontentprovider.datasource.pa_photo AcsSc.ftscontentprovider.datasource.pa_photo (private) photo_album::search::photo::datasource photo_album::search::photo::datasource AcsSc.ftscontentprovider.datasource.pa_photo->photo_album::search::photo::datasource photo_album::search::photo::register_fts_impl photo_album::search::photo::register_fts_impl (private) photo_album::search::photo::register_fts_impl->photo_album::search::photo::datasource ad_url ad_url (public) photo_album::search::photo::datasource->ad_url db_string db_string (public) photo_album::search::photo::datasource->db_string photo_album::photo::get photo_album::photo::get (public) photo_album::search::photo::datasource->photo_album::photo::get photo_album::photo::package_url photo_album::photo::package_url (public) photo_album::search::photo::datasource->photo_album::photo::package_url template::adp_include template::adp_include (public) photo_album::search::photo::datasource->template::adp_include

Testcases:
No testcase defined.
Source code:
    # get the item_id if we got a revision_id
    set item_id [db_string item_id {select item_id from cr_revisions where revision_id = :photo_id} -default $photo_id]

    photo_album::photo::get -photo_id $item_id -array photo

    # get the base url
    set base [photo_album::photo::package_url -photo_id $item_id]
    set full "[ad_url]$base"

    set ::lev [info level]
    namespace eval ::template { 
        variable parse_level 
        lappend parse_level $::lev
    }
    set body [template::adp_include /packages/photo-album/lib/one-photo [list &photo "photo" base $base style feed]]
    namespace eval ::template { 
        variable parse_level 
        template::util::lpop parse_level
    }


    return [list object_id $photo_id  title $photo(title)  mime "text/html"  keywords {}  storage_type text  content $body  syndication [list link "${full}photo/photo_id=$item_id"  description "$photo(description) $photo(caption)"  author $photo(username)  category photos  guid "[ad_url]/o/$item_id"  pubDate $photo(created_ansi)]  ]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: