item::get_content (public, deprecated)

 item::get_content [ -revision_id revision_id ] -array array \
    [ -item_id item_id ]

Defined in packages/acs-content-repository/tcl/deprecated-procs.tcl

Deprecated. Invoking this procedure generates a warning.

Switches:
-revision_id (optional)
The revision whose attributes are to be retrieved
-array (required)
-item_id (optional)
Options:
-item_id
The item_id of the corresponding item. You can provide this as an optimization. If you don't provide revision_id, you must provide item_id, and the item must have a live revision.
Returns:
1 on success (and set the array in the calling frame), 0 on failure
See Also:

Testcases:
No testcase defined.
Source code:
ad_log_deprecated proc item::get_content
    upvar 1 $array content

    if { $item_id eq "" } {
        set item_id [::content::revision::item_id -revision_id  $revision_id]
        if { $item_id eq "" } {
            ns_log notice "item::get_content: no such revision: $revision_id"
            return 0
        }
    } elseif$revision_id eq "" } {
        set revision_id [::content::item::get_live_revision -item_id $item_id]
    }
    if { $revision_id eq "" } {
        error "You must supply revision_id, or the item must have a live revision."
    }

    return [item::get_revision_content $revision_id $item_id]
Generic XQL file:
packages/acs-content-repository/tcl/deprecated-procs.xql

PostgreSQL XQL file:
packages/acs-content-repository/tcl/deprecated-procs-postgresql.xql

Oracle XQL file:
packages/acs-content-repository/tcl/deprecated-procs-oracle.xql

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