request-new-2.tcl

Request a new notification

Location:
/packages/notifications/www/request-new-2.tcl
Author:
Ben Adida <ben@openforce.net>
Created:
2002-05-24
CVS ID:
$Id: request-new-2.tcl,v 1.7 2018/06/07 17:09:17 hectorr Exp $

Related Files

[ hide source ] | [ make this the default ]

File Contents

ad_page_contract {

    Request a new notification

    @author Ben Adida (ben@openforce.net)
    @creation-date 2002-05-24
    @cvs-id $Id: request-new-2.tcl,v 1.7 2018/06/07 17:09:17 hectorr Exp $
} {
    type_id:naturalnum,notnull
    object_id:naturalnum,notnull
    return_url:localurl
}

set user_id [ad_conn user_id]

# Check that the object can be subscribed to
permission::require_permission -party_id $user_id -object_id $object_id -privilege "read"

# Add the request
notification::request::new \
        -type_id $type_id \
        -user_id $user_id \
        -object_id $object_id \
        -interval_id $interval_id \
        -delivery_method_id $delivery_method_id

ad_returnredirect $return_url



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