delete-2.tcl
Deletes the attribute and all values
- Location:
- /packages/acs-subsite/www/admin/attributes/delete-2.tcl
- Author:
- mbryzek@arsdigita.com
- Created:
- Sun Nov 12 18:03:50 2000
- CVS ID:
$Id: delete-2.tcl,v 1.6.2.1 2019/05/16 09:54:29 gustafn Exp $
Related Files
- packages/acs-subsite/www/admin/attributes/delete-2.xql
- packages/acs-subsite/www/admin/attributes/delete-2.tcl
[ hide source ] | [ make this the default ]
File Contents
ad_page_contract { Deletes the attribute and all values @author mbryzek@arsdigita.com @creation-date Sun Nov 12 18:03:50 2000 @cvs-id $Id: delete-2.tcl,v 1.6.2.1 2019/05/16 09:54:29 gustafn Exp $ } { attribute_id:notnull,naturalnum,attribute_dynamic_p { return_url:localurl "" } { operation "" } } if {$operation eq "Yes, I really want to delete this attribute"} { db_transaction { set object_type [db_string select_object_type { select attr.object_type from acs_attributes attr where attr.attribute_id = :attribute_id } -default ""] # If object type is empty, that means the attribute doesn't exist if { $object_type ne "" && [attribute::delete $attribute_id] } { # Recreate all the packages to use the new attribute package_recreate_hierarchy $object_type } } } elseif { $return_url eq "" } { set return_url [export_vars -base one attribute_id] } ad_returnredirect $return_url ad_script_abort # Local variables: # mode: tcl # tcl-indent-level: 4 # indent-tabs-mode: nil # End: