delete.tcl

Confirms delete of relational segment

Location:
/packages/acs-subsite/www/admin/rel-segments/delete.tcl
Author:
mbryzek@arsdigita.com
Created:
Tue Dec 12 11:23:12 2000
CVS ID:
$Id: delete.tcl,v 1.7 2018/06/07 17:41:01 hectorr Exp $

Related Files

[ hide source ] | [ make this the default ]

File Contents

# /packages/mbryzek-subsite/www/admin/rel-segments/delete.tcl

ad_page_contract {

    Confirms delete of relational segment

    @author mbryzek@arsdigita.com
    @creation-date Tue Dec 12 11:23:12 2000
    @cvs-id $Id: delete.tcl,v 1.7 2018/06/07 17:41:01 hectorr Exp $

} {
    segment_id:naturalnum,notnull
    { return_url:localurl "" }
} -properties {
    export_vars:onevalue
    segment_name:onevalue
} -validate {
    segment_exists_p -requires {segment_id:notnull} {
        if { ![permission::permission_p -object_id $segment_id -privilege "delete"] } {
            ad_complain "The segment either does not exist or you do not have permission to delete it"
        }
    }
}

db_1row select_segment_info {
    select s.segment_name 
      from rel_segments s
     where s.segment_id = :segment_id
}

set export_vars [export_vars -form {segment_id}]
set context [list \
     [list "[ad_conn package_url]admin/rel-segments/" "Relational segments"] \
     [list [export_vars -base one segment_id] "One segment"] \
     "Remove segment"]

ad_return_template

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