Index: openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl,v diff -u -r1.18 -r1.19 --- openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl 22 Dec 2003 21:53:20 -0000 1.18 +++ openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl 5 Apr 2004 16:34:11 -0000 1.19 @@ -235,7 +235,7 @@ # optional, specified in the ad_page_contract call error ad_proc -public ad_page_contract { - -type + {-form {}} -properties docstring args @@ -512,12 +512,11 @@ @param query the query arguments that this page accepts. The query argument takes form of a list of argument specs. See above. - @param type the document type that this page will deliver. Use - properties if the type is anonymous. - - @param properties what properties the resulting document will contain, in case - you don't specify a predefined type. + @param properties what properties the resulting document will contain. + @param form Optionally supply the parameters directly here instead of fetching them from the page's form (ns_getform). + This should be a reference to an ns_set. + @author Lars Pind (lars@pinds.com) @author Yonatan Feldman (yon@arsdigita.com) @author Bryan Quinn (bquinn@arsdigita.com) @@ -551,10 +550,6 @@ ad_arg_parser $valid_args $args } - if {[info exists type] && [info exists properties]} { - return -code error "You can't have both a -type and a -properties argument with ad_page_contract" - } - #################### # # Check supplied query form and set up variables in caller's environment @@ -704,7 +699,7 @@ ad_parse_documentation_string $docstring doc_elements # copy all the standard elements over - foreach element { query type properties } { + foreach element { query properties } { if { [info exists $element] } { set doc_elements($element) [set $element] } @@ -825,7 +820,9 @@ # #################### - set form [ns_getform] + if { [empty_string_p $form] } { + set form [ns_getform] + } if { [empty_string_p $form] } { set form_size 0