news__datasource (private)

 news__datasource object_id

Defined in packages/news/tcl/news-procs.tcl

This proc implements the 'datasource' operation of the FtsContentProvider Service Contract and should not be invoke directly.

Parameters:
object_id (required)
Author:
Jeff Davis <davis@xarg.net>

Partial Call Graph (max 5 caller/called nodes):
%3 ad_url ad_url (public) db_1row db_1row (public) news_util_get_url news_util_get_url (public) template::adp_include template::adp_include (public) news__datasource news__datasource news__datasource->ad_url news__datasource->db_1row news__datasource->news_util_get_url news__datasource->template::adp_include

Testcases:
No testcase defined.
Source code:
    db_1row get {
        select
        item_id,
        package_id,
        live_revision,
        publish_title,
        publish_lead,
        publish_format,
        publish_date,
        publish_body,
        creation_user,
        item_creator
        from news_items_live_or_submitted
        where item_id = :object_id
        or item_id = (select item_id from cr_revisions where revision_id = :object_id)}

    set url_stub [news_util_get_url $package_id]
    set url "[ad_url]${url_stub}item/$item_id"

    if {$publish_lead eq ""} {
        set publish_lead $publish_body
    }

    set content [template::adp_include /packages/news/www/news  [list  item_id $object_id  publish_title $publish_title  publish_lead $publish_lead  publish_body $publish_body  publish_format $publish_format  publish_image {}  creator_link $item_creator ]]

    return [list  object_id $object_id  title $publish_title  content $content  mime text/html  keywords {}  storage_type text  syndication [list link $url  description $publish_lead  author $item_creator  category News  guid "[ad_url]/o/$item_id"  pubDate $publish_date  ]  ]
Generic XQL file:
packages/news/tcl/news-procs.xql

PostgreSQL XQL file:
packages/news/tcl/news-procs-postgresql.xql

Oracle XQL file:
packages/news/tcl/news-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: