• Publicity: Public Only All

deprecated-procs.tcl

Provides a collection of deprecated procs to provide backward compatibility for sites who have not yet removed calls to the deprecated functions. In order to skip loading of deprecated code, use the following snippet in your config file ns_section ns/server/${server}/acs ns_param WithDeprecatedCode 0

Location:
packages/acs-content-repository/tcl/deprecated-procs.tcl
CVS Identification:
$Id: deprecated-procs.tcl,v 1.7.2.2 2021/02/22 11:47:19 gustafn Exp $

Procedures in this file

Detailed information

content::get_folder_labels (public, deprecated)

 content::get_folder_labels [ varname ]
Deprecated. Invoking this procedure generates a warning.

Set a data source in the calling frame with folder URL and label Useful for generating a context bar. This function returns a hard-coded name for the root level. One should use for path generation for items the appropriate API, such as e.g. content::item::get_virtual_path

Parameters:
varname (optional, defaults to "folders")
See Also:

Testcases:
No testcase defined.

content_extlink::delete (public, deprecated)

 content_extlink::delete -extlink_id extlink_id
Deprecated. Invoking this procedure generates a warning.

Delete an external link.

Switches:
-extlink_id (required)
The object id of the link to delete
See Also:

Testcases:
No testcase defined.

content_extlink::edit (public, deprecated)

 content_extlink::edit -extlink_id extlink_id -url url -label label \
    -description description
Deprecated. Invoking this procedure generates a warning.

Edit an existing external link. The parameters are required because it is assumed that the caller will be pulling the existing values out of the database before editing them.

Switches:
-extlink_id (required)
Optional pre-assigned object_id for the link
-url (required)
The URL of the external resource
-label (required)
Label for the extlink (defaults to the URL)
-description (required)
An extended description of the link (defaults to NULL)
See Also:

Testcases:
No testcase defined.

content_extlink::extlink_name (public, deprecated)

 content_extlink::extlink_name -item_id item_id
Deprecated. Invoking this procedure generates a warning.

Returns the name of an extlink

Switches:
-item_id (required)
The object id of the item to check.
See Also:

Testcases:
No testcase defined.

content_extlink::extlink_p (public, deprecated)

 content_extlink::extlink_p -item_id item_id
Deprecated. Invoking this procedure generates a warning.

Returns true if the given item is an external link.

Switches:
-item_id (required)
The object id of the item to check.
See Also:

Testcases:
No testcase defined.

content_extlink::new (public, deprecated)

 content_extlink::new [ -extlink_id extlink_id ] -url url \
    -parent_id parent_id [ -name name ] [ -label label ] \
    [ -description description ] [ -package_id package_id ]
Deprecated. Invoking this procedure generates a warning.

Create a new external link.

Switches:
-extlink_id (optional)
Optional pre-assigned object_id for the link
-url (required)
The URL of the external resource
-parent_id (required)
The folder that will contain this extlink
-name (optional)
Name to assign the object (defaults to "link extlink_id")
-label (optional)
Label for the extlink (defaults to the URL)
-description (optional)
An extended description of the link (defaults to NULL)
-package_id (optional)
Package Id of the package that created the link
See Also:

Testcases:
No testcase defined.

content_search__datasource (public, deprecated)

 content_search__datasource object_id
Deprecated. Invoking this procedure generates a warning.

Provides data source for search interface. Used to access content items after search. DEPRECATED: does not comply with OpenACS naming convention

Parameters:
object_id (required)
See Also:

Testcases:
No testcase defined.

content_search__url (public, deprecated)

 content_search__url object_id
Deprecated. Invoking this procedure generates a warning.

Provides a URL for linking to content items which show up in a search result set. DEPRECATED: does not comply with OpenACS naming convention

Parameters:
object_id (required)
See Also:

Testcases:
No testcase defined.

content_symlink::delete (public, deprecated)

 content_symlink::delete -symlink_id symlink_id
Deprecated. Invoking this procedure generates a warning.

Delete an external link.

Switches:
-symlink_id (required)
The object id of the link to delete
See Also:

Testcases:
No testcase defined.

content_symlink::edit (public, deprecated)

 content_symlink::edit -symlink_id symlink_id -target_id target_id \
    -label label
Deprecated. Invoking this procedure generates a warning.

Edit an existing internal link. The parameters are required because it is assumed that the caller will be pulling the existing values out of the database before editing them.

Switches:
-symlink_id (required)
Optional pre-assigned object_id for the link
-target_id (required)
The target item_id of the link
-label (required)
Label for the symlink (defaults to the target_id item title)

Testcases:
No testcase defined.

content_symlink::new (public, deprecated)

 content_symlink::new [ -symlink_id symlink_id ] -target_id target_id \
    -parent_id parent_id [ -name name ] [ -label label ] \
    [ -package_id package_id ]
Deprecated. Invoking this procedure generates a warning.

Create a new internal link.

Switches:
-symlink_id (optional)
Optional pre-assigned object_id for the link
-target_id (required)
The item_id of the target of the link
-parent_id (required)
The folder that will contain this symlink
-name (optional)
Name to assign the object (defaults to the name of the target item)
-label (optional)
Label for the symlink (defaults to the URL)
-package_id (optional)
Package Id of the package that created the link
See Also:

Testcases:
No testcase defined.

content_symlink::resolve (public, deprecated)

 content_symlink::resolve -item_id item_id
Deprecated. Invoking this procedure generates a warning.

Switches:
-item_id (required)
item_id of content_symlink item to resolve
Returns:
item_id of symlink target
See Also:

Testcases:
No testcase defined.

content_symlink::resolve_content_type (public, deprecated)

 content_symlink::resolve_content_type -item_id item_id
Deprecated. Invoking this procedure generates a warning.

Switches:
-item_id (required)
item_id of symlink
Returns:
content_type of target item
See Also:

Testcases:
No testcase defined.

content_symlink::symlink_name (public)

 content_symlink::symlink_name -item_id item_id

Returns the name of an symlink

Switches:
-item_id (required)
The object id of the item to check.

Testcases:
No testcase defined.

content_symlink::symlink_p (public, deprecated)

 content_symlink::symlink_p -item_id item_id
Deprecated. Invoking this procedure generates a warning.

Returns true if the given item is a symlink

Switches:
-item_id (required)
The object id of the item to check.
See Also:

Testcases:
No testcase defined.

cr::keyword::delete (public, deprecated)

 cr::keyword::delete -keyword_id keyword_id
Deprecated. Invoking this procedure generates a warning.

Delete a keyword.

Switches:
-keyword_id (required)
Author:
Peter Marklund
See Also:

Testcases:
No testcase defined.

cr::keyword::get_children (public, deprecated)

 cr::keyword::get_children [ -parent_id parent_id ]
Deprecated. Invoking this procedure generates a warning.

Returns the ids of the keywords having the given parent_id. Returns an empty list if there are no children.

Switches:
-parent_id (optional)
Author:
Peter Marklund
See Also:

Testcases:
No testcase defined.

cr::keyword::get_keyword_id (public, deprecated)

 cr::keyword::get_keyword_id -parent_id parent_id -heading heading
Deprecated. Invoking this procedure generates a warning.

Get the keyword with the given heading under the given parent. Returns the empty string if none exists.

Switches:
-parent_id (required)
-heading (required)
See Also:

Testcases:
No testcase defined.

cr::keyword::get_options_flat (public, deprecated)

 cr::keyword::get_options_flat [ -parent_id parent_id ]
Deprecated. Invoking this procedure generates a warning.

Returns a flat options list of the keywords with the given parent_id.

Switches:
-parent_id (optional)
See Also:

Testcases:
No testcase defined.

cr::keyword::item_assign (public, deprecated)

 cr::keyword::item_assign -item_id item_id -keyword_id keyword_id \
    [ -singular ]
Deprecated. Invoking this procedure generates a warning.

Assign one or more keywords to a content_item.

Switches:
-item_id (required)
-keyword_id (required)
A list of keywords to assign.
-singular (optional, boolean)
If singular is specified, then any keywords with the same parent_id as this keyword_id will first be unassigned.
Returns:
the supplied item_id for convenience.
See Also:

Testcases:
No testcase defined.

cr::keyword::item_get_assigned (public, deprecated)

 cr::keyword::item_get_assigned -item_id item_id \
    [ -parent_id parent_id ]
Deprecated. Invoking this procedure generates a warning.

Returns a list of all keywords assigned to the given cr_item. If parent_id is supplied, only keywords that are children of parent_id are listed.

Switches:
-item_id (required)
-parent_id (optional)
See Also:

Testcases:
No testcase defined.

cr::keyword::item_unassign (public, deprecated)

 cr::keyword::item_unassign -keyword_id keyword_id -item_id item_id
Deprecated. Invoking this procedure generates a warning.

Unassign a single keyword from a content item. Returns the supplied item_id for convenience.

Switches:
-keyword_id (required)
-item_id (required)
See Also:

Testcases:
No testcase defined.

cr::keyword::item_unassign_children (public, deprecated)

 cr::keyword::item_unassign_children -item_id item_id \
    -parent_id parent_id
Deprecated. Invoking this procedure generates a warning.

Unassign all the keywords attached to a content item that are children of keyword parent_id.

Switches:
-item_id (required)
-parent_id (required)
Returns:
the supplied item_id for convenience.
See Also:

Testcases:
No testcase defined.

cr::keyword::new (public, deprecated)

 cr::keyword::new -heading heading [ -description description ] \
    [ -parent_id parent_id ] [ -keyword_id keyword_id ] \
    [ -object_type object_type ] [ -package_id package_id ]
Deprecated. Invoking this procedure generates a warning.

Create a new keyword

Switches:
-heading (required)
-description (optional)
-parent_id (optional)
-keyword_id (optional)
-object_type (optional, defaults to "content_keyword")
-package_id (optional)
See Also:

Testcases:
No testcase defined.

cr::keyword::set_heading (public, deprecated)

 cr::keyword::set_heading -keyword_id keyword_id -heading heading
Deprecated. Invoking this procedure generates a warning.

Update a keyword heading

Switches:
-keyword_id (required)
-heading (required)
See Also:

Testcases:
No testcase defined.

folder::delete (public, deprecated)

 folder::delete -folder_id folder_id
Deprecated. Invoking this procedure generates a warning.

Deprecated. See content::folder::delete instead. Delete a content folder. If the folder to delete has children content items referencing it via acs_objects.context_id then this proc will fail.

Switches:
-folder_id (required)
Author:
Peter Marklund
See Also:

Testcases:
No testcase defined.

image_search__datasource (public, deprecated)

 image_search__datasource object_id
Deprecated. Invoking this procedure generates a warning.

Provides data source for search interface. Used to access content items after search. DEPRECATED: does not comply with OpenACS naming convention

Parameters:
object_id (required)
See Also:

Testcases:
No testcase defined.

image_search__url (public, deprecated)

 image_search__url object_id
Deprecated. Invoking this procedure generates a warning.

Provides a URL for linking to content items which show up in a search result set. DEPRECATED: does not comply with OpenACS naming convention

Parameters:
object_id (required)
See Also:

Testcases:
No testcase defined.

item::content_is_null (public, deprecated)

 item::content_is_null revision_id
Deprecated. Invoking this procedure generates a warning.

Parameters:
revision_id (required)
The revision id
Returns:
1 if the content is null, 0 otherwise
See Also:

Testcases:
No testcase defined.

item::content_methods_by_type (public, deprecated)

 item::content_methods_by_type content_type [ args... ]
Deprecated. Invoking this procedure generates a warning.

Parameters:
content_type (required)
The content type
Options:
-get_labels
Return not just a list of types, but a list of name-value pairs, as in the -options ATS switch for form widgets
Returns:
A Tcl list of all possible content methods
See Also:

Testcases:
No testcase defined.

item::copy (public, deprecated)

 item::copy -item_id item_id -target_folder_id target_folder_id
Deprecated. Invoking this procedure generates a warning.

Copy the given item.

Switches:
-item_id (required)
The content item to copy
-target_folder_id (required)
The folder which will hold the new copy
See Also:

Testcases:
No testcase defined.

item::delete (public, deprecated)

 item::delete -item_id item_id
Deprecated. Invoking this procedure generates a warning.

Delete a content item from the database. If the content item to delete has children content items referencing its parent via acs_objects.context_id then this proc will fail.

Switches:
-item_id (required)
Author:
Peter Marklund
See Also:

Testcases:
No testcase defined.

item::get (public, deprecated)

 item::get -item_id item_id -array array
Deprecated. Invoking this procedure generates a warning.

Get information about a content item.

Switches:
-item_id (required)
The id of the item to get info for
-array (required)
The name of the array to populate with values. The keys are: ITEM_ID, PARENT_ID, NAME, LOCALE, LIVE_REVISION, LATEST_REVISION, PUBLISH_STATUS, CONTENT_TYPE, STORAGE_TYPE, STORAGE_AREA_KEY, ARCHIVE_DATE, PACKAGE_ID
Author:
Peter Marklund
See Also:

Testcases:
No testcase defined.

item::get_best_revision (public, deprecated)

 item::get_best_revision item_id
Deprecated. Invoking this procedure generates a warning.

Parameters:
item_id (required)
The item id
Returns:
The best revision id for the item, or an empty string if no revisions exist
See Also:

Testcases:
No testcase defined.

item::get_content (public, deprecated)

 item::get_content [ -revision_id revision_id ] -array array \
    [ -item_id item_id ]
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.

item::get_content_type (public, deprecated)

 item::get_content_type item_id
Deprecated. Invoking this procedure generates a warning.

Parameters:
item_id (required)
The item id
Returns:
The content type of the item, or an empty string if no such item exists
See Also:

Testcases:
No testcase defined.

item::get_element (public, deprecated)

 item::get_element -item_id item_id -element element
Deprecated. Invoking this procedure generates a warning.

Return the value of a single element (attribute) of a content item.

Switches:
-item_id (required)
The id of the item to get element value for
-element (required)
The name (column name) of the element. See item::get for valid element names.
See Also:

Testcases:
No testcase defined.

item::get_extended_url (public, deprecated)

 item::get_extended_url item_id [ args... ]
Deprecated. Invoking this procedure generates a warning.

Retrieves the relative URL of the item with a file extension based on the item's mime_type (Example: "/foo/bar/baz.html").

Parameters:
item_id (required)
The item id
Options:
-template_extension
Signifies that the file extension should be retrieved using the mime_type of the template assigned to the item, not from the item itself. The live revision of the template is used. If there is no template which could be used to render the item, or if the template has no live revision, the extension defaults to ".html"
-revision_id
{default the live revision} Specifies the revision_id which will be used to retrieve the item's mime_type. This option is ignored if the -template_extension option is specified.
Returns:
The relative URL of the item with the appropriate file extension or an empty string on failure
See Also:
  • proc item::get_url
  • proc item::get_mime_info
  • proc item::get_template_id

Testcases:
No testcase defined.

item::get_id (public, deprecated)

 item::get_id url [ root_folder ]
Deprecated. Invoking this procedure generates a warning.

Parameters:
url (required)
The URL
root_folder (optional)
{default The Sitemap} The ID of the root folder to use for resolving the URL
Returns:
The item ID of the item at that URL, or the empty string on failure
See Also:

Testcases:
No testcase defined.

item::get_item_from_revision (public, deprecated)

 item::get_item_from_revision revision_id
Deprecated. Invoking this procedure generates a warning.

Parameters:
revision_id (required)
The revision id
Returns:
The item_id of the item to which this revision belongs
See Also:

Testcases:
No testcase defined.

item::get_latest_revision (public, deprecated)

 item::get_latest_revision item_id
Deprecated. Invoking this procedure generates a warning.

Retrieves the latest revision for the item. If the item has no live revision, returns an empty string.

Parameters:
item_id (required)
The item id
Returns:
The latest revision id for the item, or an empty string if no revisions exist
See Also:

Testcases:
No testcase defined.

item::get_live_revision (public, deprecated)

 item::get_live_revision item_id
Deprecated. Invoking this procedure generates a warning.

Parameters:
item_id (required)
The item id
Returns:
The live revision id for the item, or an empty string if no live revision exists
See Also:

Testcases:
No testcase defined.

item::get_mime_info (public, deprecated)

 item::get_mime_info revision_id [ datasource_ref ]
Deprecated. Invoking this procedure generates a warning.

Parameters:
revision_id (required)
The revision id
datasource_ref (optional, defaults to "mime_info")
{default mime_info} The name of the datasource to be created. The datasource will have two columns, mime_type and file_extension. return 1 (one) if the revision exists, 0 (zero) otherwise.
See Also:
  • proc content::item::get

Testcases:
No testcase defined.

item::get_publish_status (public, deprecated)

 item::get_publish_status item_id
Deprecated. Invoking this procedure generates a warning.

Parameters:
item_id (required)
The item id
Returns:
The publish status of the item, or the empty string on failure
See Also:
  • proc item::is_publishable

Testcases:
No testcase defined.

item::get_revision_content (public, deprecated)

 item::get_revision_content revision_id [ args... ]
Deprecated. Invoking this procedure generates a warning.

Parameters:
revision_id (required)
The revision whose attributes are to be retrieved
Options:
-item_id
{default auto-generated} The item_id of the corresponding item.
Returns:
1 on success (and create a content array in the calling frame), 0 on failure
See Also:

Testcases:
No testcase defined.

item::get_template_id (public, deprecated)

 item::get_template_id item_id [ context ]
Deprecated. Invoking this procedure generates a warning.

Parameters:
item_id (required)
The item id
context (optional, defaults to "public")
{default 'public'} The context in which the template will be used.
Returns:
The template_id of the template which can be used to render the item, or an empty string on failure
See Also:

Testcases:
No testcase defined.

item::get_template_url (public, deprecated)

 item::get_template_url item_id [ context ]
Deprecated. Invoking this procedure generates a warning.

Parameters:
item_id (required)
The item id
context (optional, defaults to "public")
{default 'public'} The context in which the template will be used.
Returns:
The template_id of the template which can be used to render the item, or an empty string on failure
See Also:

Testcases:
No testcase defined.

item::get_title (public, deprecated)

 item::get_title item_id
Deprecated. Invoking this procedure generates a warning.

Parameters:
item_id (required)
The item id
Returns:
The title of the item
See Also:

Testcases:
No testcase defined.

item::get_type (public, deprecated)

 item::get_type item_id
Deprecated. Invoking this procedure generates a warning.

Returns the content type of the specified item, or empty string if the item_id is invalid

Parameters:
item_id (required)
See Also:

Testcases:
No testcase defined.

item::get_url (public, deprecated)

 item::get_url [ -root_folder_id root_folder_id ] item_id
Deprecated. Invoking this procedure generates a warning.

Switches:
-root_folder_id (optional, defaults to "null")
Starts path resolution from this folder. Defaults to the root of the sitemap (when null).
Parameters:
item_id (required)
The item id
Returns:
The relative URL to the item, or an empty string on failure
See Also:

Testcases:
No testcase defined.

item::is_publishable (public, deprecated)

 item::is_publishable item_id
Deprecated. Invoking this procedure generates a warning.

Determine if the item is publishable. The item is publishable only if:

  • All child relations, as well as item relations, are satisfied (according to min_n and max_n)
  • The workflow (if any) for the item is finished

Parameters:
item_id (required)
The item id
Returns:
1 if the item is publishable, 0 otherwise
See Also:

Testcases:
No testcase defined.

item::publish (public, deprecated)

 item::publish -item_id item_id [ -revision_id revision_id ]
Deprecated. Invoking this procedure generates a warning.

Publish a content item. Updates the live_revision and publish_date attributes, and sets publish_status to live.

Switches:
-item_id (required)
The id of the content item
-revision_id (optional)
The id of the revision to publish. Defaults to the latest revision.
Author:
Peter Marklund
See Also:

Testcases:
No testcase defined.

item::unpublish (public, deprecated)

 item::unpublish -item_id item_id [ -publish_status publish_status ]
Deprecated. Invoking this procedure generates a warning.

Unpublish a content item.

Switches:
-item_id (required)
The id of the content item
-publish_status (optional, defaults to "production")
The publish_status to put the item in after unpublishing it.
Author:
Peter Marklund
See Also:

Testcases:
No testcase defined.

template_search__datasource (public, deprecated)

 template_search__datasource object_id
Deprecated. Invoking this procedure generates a warning.

Provides data source for search interface. Used to access content items after search. DEPRECATED: does not comply with OpenACS naming convention

Parameters:
object_id (required)
See Also:

Testcases:
No testcase defined.

template_search__url (public, deprecated)

 template_search__url object_id
Deprecated. Invoking this procedure generates a warning.

Provides a URL for linking to content items which show up in a search result set. DEPRECATED: does not comply with OpenACS naming convention

Parameters:
object_id (required)
See Also:

Testcases:
No testcase defined.
[ show source ]