Index: openacs-4/packages/acs-service-contract/tcl/acs-service-contract-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-service-contract/tcl/acs-service-contract-procs.tcl,v diff -u -N -r1.25.2.1 -r1.25.2.2 --- openacs-4/packages/acs-service-contract/tcl/acs-service-contract-procs.tcl 25 Aug 2013 20:03:54 -0000 1.25.2.1 +++ openacs-4/packages/acs-service-contract/tcl/acs-service-contract-procs.tcl 27 Aug 2013 11:20:39 -0000 1.25.2.2 @@ -22,18 +22,20 @@ {-call_args {}} {-error:boolean} } { - A wrapper for the acs_sc_call procedure, with explicitly named - parameters so it's easier to figure out how to use it. - You must supply either contract and impl, or just impl_id. + A replacement of the former acs_sc_call procedure. + One must supply either contract and impl, or just impl_id. If you supply impl_id and contract, we throw an error if the impl_id's contract doesn't match the contract you passed in. If you supply both impl_id and impl, we throw an error. + + Additional documentation and commentary at http://openacs.org/forums/message-view?message_id=108614. @param contract_name The name of the contract you wish to use. @param operation_name The name of the operation in the contract you wish to call. @param impl The name of the implementation you wish to use. @param impl_id The ID of the implementation you wish to use. @param args The arguments you want to pass to the proc. @param error If specified, will throw an error if the operation isn't implemented. + @author Lars Pind (lars@collaboraid.biz) @see acs_sc_call @@ -137,7 +139,7 @@ {impl_alias {}} {impl_pl {}} } { - Builds the proc used by acs_sc_call, generally only called + Builds the proc used by acs_sc::invoke, generally only called in acs-service-contract-init.tcl at startup. @return 0 on failure, 1 on success. @@ -163,7 +165,7 @@ return 0 } - append docblock "\nacs-service-contract operation. Call via acs_sc_call.\n\n$operation_desc\n\n" + append docblock "\nacs-service-contract operation. Call via acs_sc::invoke.\n\n$operation_desc\n\n" db_foreach operation_inputtype_element {*SQL*} { lappend arguments "$element_name" @@ -180,7 +182,7 @@ } } - append docblock "\n@see $impl_alias\n@see acs_sc_call" + append docblock "\n@see $impl_alias\n@see acs_sc::invoke" set full_statement [acs_sc_get_statement $impl_alias $impl_pl $arguments] Index: openacs-4/packages/acs-service-contract/www/doc/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-service-contract/www/doc/index.html,v diff -u -N -r1.2 -r1.2.28.1 --- openacs-4/packages/acs-service-contract/www/doc/index.html 29 Oct 2001 18:28:12 -0000 1.2 +++ openacs-4/packages/acs-service-contract/www/doc/index.html 27 Aug 2013 11:20:39 -0000 1.2.28.1 @@ -89,7 +89,7 @@

Dispatching

Examples

Index: openacs-4/packages/acs-service-contract/www/doc/index.stx =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-service-contract/www/doc/index.stx,v diff -u -N -r1.1 -r1.1.28.1 --- openacs-4/packages/acs-service-contract/www/doc/index.stx 29 Oct 2001 18:28:12 -0000 1.1 +++ openacs-4/packages/acs-service-contract/www/doc/index.stx 27 Aug 2013 11:20:39 -0000 1.1.28.1 @@ -134,7 +134,7 @@ Dispatching - - (tcl) acs_sc_call (contract, operation, [arguments, impl]): + - (tcl) acs_sc::invoke (contract, operation, [arguments, impl]): calls an operation Examples Index: openacs-4/packages/acs-service-contract/www/doc/index.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-service-contract/www/doc/index.xml,v diff -u -N -r1.1 -r1.1.28.1 --- openacs-4/packages/acs-service-contract/www/doc/index.xml 29 Oct 2001 18:28:12 -0000 1.1 +++ openacs-4/packages/acs-service-contract/www/doc/index.xml 27 Aug 2013 11:20:39 -0000 1.1.28.1 @@ -234,7 +234,7 @@ Dispatching -(tcl) acs_sc_call (contract, operation, [arguments, impl]): +(tcl) acs_sc::invoke (contract, operation, [arguments, impl]): calls an operation Index: openacs-4/packages/rss-support/www/subscr-ae.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/www/subscr-ae.tcl,v diff -u -N -r1.7.20.1 -r1.7.20.2 --- openacs-4/packages/rss-support/www/subscr-ae.tcl 26 Aug 2013 07:57:14 -0000 1.7.20.1 +++ openacs-4/packages/rss-support/www/subscr-ae.tcl 27 Aug 2013 11:20:39 -0000 1.7.20.2 @@ -9,7 +9,7 @@ we pull out channel title and link. It would be very tempting to accept impl_name as an argument - instead of impl_id. However, the "apply" call in acs_sc_call + instead of impl_id. However, the "ad_apply" call in acs_sc::invoke raises the ugly possibility of code-smuggling through the url, so we will force the use of the easily validated impl_id instead.