ad_partner_initialize

one of the documented procedures in this installation of the ACS
Usage:
ad_partner_initialize
What it does:
Registers every url_stub from ad_partner_url as a url
Defined in: /web/philip/tcl/ad-partner-defs.tcl

Source code:



    # if for some reason, we can't get a db handle, what cookies do we still
    # need to register?
    set list_of_cookies_to_register [list]
    
    if { [catch {set db [ns_db gethandle subquery]} err_msg] } {
	ns_log Notice "ad-partner: Can't get db handle. Using list_of_cookies to register cookies"
    } else {
	set sub_selection [ns_db select $db "select distinct partner_cookie from ad_partner"]
	
	while { [ns_db getrow $db $sub_selection] } {
	    set_variables_after_subquery
	    if {[lsearch -exact $list_of_cookies_to_register $partner_cookie] == -1} {
		lappend list_of_cookies_to_register $partner_cookie
	    }
	}
	
	ns_db releasehandle $db
    }

    foreach partner_cookie $list_of_cookies_to_register {
	ad_register_proc GET /$partner_cookie/* ad_set_partner_cookie
	ad_register_proc POST /$partner_cookie/* ad_set_partner_cookie
	ns_log Notice "Registered partner cookie: $partner_cookie"
    }



philg@mit.edu