Index: openacs.org-dev/packages/edit-this-page/tcl/etp-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/packages/edit-this-page/tcl/etp-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs.org-dev/packages/edit-this-page/tcl/etp-procs.tcl 26 Sep 2002 20:00:19 -0000 1.3 +++ openacs.org-dev/packages/edit-this-page/tcl/etp-procs.tcl 10 Jan 2003 02:26:40 -0000 1.4 @@ -124,7 +124,7 @@ array set application_params [list] } set application_params($name) $params - ns_log Notice "ETP application $name is $application_params($name)" +# ns_log Notice "ETP application $name is $application_params($name)" } ad_proc -public modify_application { name params } { @@ -135,7 +135,7 @@ array set param_array $application_params($name) array set param_array $params set application_params($name) [array get param_array] - ns_log Notice "ETP application $name is modified to $application_params($name)" +# ns_log Notice "ETP application $name is modified to $application_params($name)" } ad_proc -public get_defined_applications { } { @@ -191,7 +191,7 @@ set package_id [ad_conn package_id] set content_type [etp::get_content_type $name] - +#ns_log notice "DAVEB: ETP::make_page content_type=$content_type" # ensure an entry in cr_items for this (package_id, name) combination if { ![db_0or1row page_exists ""] } { @@ -210,6 +210,7 @@ } else { set content_type [etp::get_application_param content_content_type] } +# ns_log notice "DAVEB: content_type=$content_type" return $content_type } @@ -420,7 +421,7 @@ set param_name "content_${attr_name}_attr_name" } - ns_log Notice "Asking for $param_name" +# ns_log Notice "Asking for $param_name" set pretty_name [etp::get_application_param $param_name] } @@ -480,7 +481,7 @@ set url_stub [ns_conn url] array set site_node [site_node $url_stub] -ns_log notice "DAVEB: [site_node $url_stub]" +#ns_log notice "DAVEB: [site_node $url_stub]" set urlc [regexp -all "/" $url_stub] if { ($site_node(package_key) == "edit-this-page" || ($site_node(package_key) == "acs-subsite")) && @@ -520,6 +521,20 @@ return $revision_id } +ad_proc -public get_item_id { package_id name} { + @author Dave Bauer + @creation-date 2002-12-18 + + returns the item_id of a page +} { + db_1row get_item_id { + select item_id from cr_items where + name = :name + and parent_id=etp__get_folder_id(:package_id) + } + return $item_id +} + ad_proc -public get_live_revision_id { package_id name } { @author Luke Pond @creation-date 2001-06-10 @@ -573,7 +588,7 @@ set extra_where_clauses [db_map gci_where_clause] set columns [db_map gci_columns_clause] - ns_log warning "columns: $columns" +# ns_log warning "columns: $columns" set limit_clause "" @@ -613,10 +628,10 @@ if { [lsearch -exact { item_id revision_id content publish_date } $arg] != -1 } { append columns ",\n r.$arg" } else { - ns_log Notice "extended attribute named $arg" +# ns_log Notice "extended attribute named $arg" set attr_desc [etp::get_attribute_desc $arg $content_type] if { ![empty_string_p $attr_desc] } { - ns_log Notice "adding it" +# ns_log Notice "adding it" set lookup_sql [etp::get_attribute_lookup_sql $attr_desc] append columns ",\n $lookup_sql" }