site-wide-status-change.tcl

Toggle the site-wide status of a category tree.

Location:
/packages/categories/www/cadmin/site-wide-status-change.tcl
Author:
Timo Hentschel <timo@timohentschel.de>
CVS ID:
$Id: site-wide-status-change.tcl,v 1.9.2.1 2019/12/20 21:18:10 gustafn Exp $

Related Files

[ hide source ] | [ make this the default ]

File Contents

ad_page_contract {
    Toggle the site-wide status of a category tree.

    @author Timo Hentschel (timo@timohentschel.de)
    @cvs-id $Id: site-wide-status-change.tcl,v 1.9.2.1 2019/12/20 21:18:10 gustafn Exp $
} {
    tree_id:naturalnum,notnull
    action:integer
    {locale:word ""}
    object_id:naturalnum,optional
}

set user_id [auth::require_login]
set package_id [ad_conn package_id]
permission::require_permission -object_id $package_id -privilege category_admin

db_dml toggle_site_wide_status ""

ad_returnredirect [export_vars -no_empty -base permission-manage {tree_id locale object_id}]
ad_script_abort

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