category-links-procs.tcl

category-links procs for the site-wide categorization package.

Location:
packages/categories/tcl/category-links-procs.tcl
Created:
04 February 2004
Author:
Timo Hentschel <timo@timohentschel.de>
CVS Identification:
$Id: category-links-procs.tcl,v 1.3 2017/08/07 23:48:05 gustafn Exp $

Procedures in this file

Detailed information

category_link::add (public)

 category_link::add -from_category_id from_category_id \
    -to_category_id to_category_id

Insert a new category link.

Switches:
-from_category_id (required)
-to_category_id (required)
Options:
-from_category_id
category_id the links comes from.
-to_category_id
category_id the link goes to.
Returns:
link_id
Author:
Timo Hentschel <timo@timohentschel.de>

Partial Call Graph (max 5 caller/called nodes):
%3 test_category_link category_link (test categories) category_link::add category_link::add test_category_link->category_link::add db_exec_plsql db_exec_plsql (public) category_link::add->db_exec_plsql db_transaction db_transaction (public) category_link::add->db_transaction packages/categories/www/cadmin/category-link-add-3.tcl packages/categories/ www/cadmin/category-link-add-3.tcl packages/categories/www/cadmin/category-link-add-3.tcl->category_link::add packages/categories/www/cadmin/category-link-add-4.tcl packages/categories/ www/cadmin/category-link-add-4.tcl packages/categories/www/cadmin/category-link-add-4.tcl->category_link::add

Testcases:
category_link

category_link::delete (public)

 category_link::delete link_id

Deletes a category link.

Parameters:
link_id (required)
category link to be deleted.
Author:
Timo Hentschel <timo@timohentschel.de>

Partial Call Graph (max 5 caller/called nodes):
%3 test_category_link category_link (test categories) category_link::delete category_link::delete test_category_link->category_link::delete db_exec_plsql db_exec_plsql (public) category_link::delete->db_exec_plsql packages/categories/www/cadmin/category-link-delete-2.tcl packages/categories/ www/cadmin/category-link-delete-2.tcl packages/categories/www/cadmin/category-link-delete-2.tcl->category_link::delete

Testcases:
category_link
[ hide source ] | [ make this the default ]

Content File Source

ad_library {
    category-links procs for the site-wide categorization package.

    @author Timo Hentschel (timo@timohentschel.de)

    @creation-date 04 February 2004
    @cvs-id $Id: category-links-procs.tcl,v 1.3 2017/08/07 23:48:05 gustafn Exp $
}

namespace eval category_link {}

d_proc -public category_link::add {
    {-from_category_id:required}
    {-to_category_id:required}
} {
    Insert a new category link.

    @option from_category_id category_id the links comes from.
    @option to_category_id category_id the link goes to.
    @return link_id
    @author Timo Hentschel (timo@timohentschel.de)
} {
    db_transaction {
    set link_id [db_exec_plsql insert_category_link ""]
    }
    return $link_id
}

ad_proc -public category_link::delete { link_id } {
    Deletes a category link.

    @param link_id category link to be deleted.
    @author Timo Hentschel (timo@timohentschel.de)
} {
    db_exec_plsql delete_category_link ""
}

# Local variables:
#    mode: tcl
#    tcl-indent-level: 4
#    indent-tabs-mode: nil
# End: