Index: openacs-4/packages/new-portal/tcl/portal-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/tcl/portal-procs.tcl,v diff -u -r1.153 -r1.154 --- openacs-4/packages/new-portal/tcl/portal-procs.tcl 12 Jul 2002 21:26:48 -0000 1.153 +++ openacs-4/packages/new-portal/tcl/portal-procs.tcl 13 Jul 2002 03:05:24 -0000 1.154 @@ -16,11 +16,13 @@ # tcl/portal-procs.tcl ad_library { + Portal. @author Arjun Sanyal (arjun@openforce.net) @creation-date Sept 2001 @version $Id$ + } namespace eval portal { @@ -29,21 +31,6 @@ # acs-service-contract procs # - ad_proc -private log_time {str} { - global old_time - set time "[expr [expr [clock clicks] + 1000000000] / 1000]" - - if {![info exists old_time]} { - set diff "--" - } else { - set diff [expr "$time - $old_time"] - } - - set old_time $time - - ns_log Notice "DEBUG-TIME: $time ($diff) - $str" - } - ad_proc -public datasource_call { {-datasource_name ""} ds_id @@ -86,12 +73,11 @@ } } - # # Special Hacks # - # The mangement is not responsible for the results of multi-mounting + # The management is not responsible for the results of multi-mounting ad_proc -private package_key {} { Returns the package_key @@ -356,7 +342,6 @@ db_dml update {} } - ad_proc -public configure { {-referer ""} {-template_p f} @@ -371,9 +356,11 @@ @param portal_id @return_url } { + # # check perms # + set edit_p [permission::permission_p \ -object_id $portal_id \ -privilege portal_edit_portal] @@ -386,6 +373,7 @@ # # Set up some whole page stuff # + set master_template [ad_parameter master_template] set action_string [generate_action_string] if { $template_p == "f" } { @@ -404,6 +392,7 @@ # # Begin creating the template # + set template "

@@ -413,6 +402,7 @@ # # Theme selection chunk # + set theme_chunk "

@@ -443,6 +433,7 @@ # # Per-page template chunks # + set list_of_page_ids [list_pages_tcl_list -portal_id $portal_id] foreach page_id $list_of_page_ids { @@ -456,6 +447,7 @@ # # Page rename chunk # + set page_name_chunk " @@ -530,6 +522,7 @@ # # Layout change chunk - only shown when there are no visible elements on the page # + set layout_chunk "" foreach layout [get_layout_info] { @@ -595,6 +588,7 @@ # # Revert page chunk # + if {![empty_string_p [get_portal_template_id $portal_id]]} { append template "
@@ -609,6 +603,7 @@ # # Templating system hacks # + set __adp_stub "[get_server_root][www_path]/." set {master_template} \"master\" @@ -826,10 +821,10 @@ } } - # # portal template procs - util and configuration # + ad_proc -private get_portal_template_id { portal_id } { @@ -867,7 +862,6 @@ configure_dispatch -template_p "t" $portal_id $form } - # # Page Procs # @@ -1541,7 +1535,6 @@ return [array get element] } - ad_proc -private evaluate_element_raw { element_id } { Just call show on the element @@ -1601,7 +1594,6 @@ return [array get element] } - ad_proc -public configure_element { {-noconn ""} element_id @@ -1886,7 +1878,6 @@ } } - ad_proc -public add_element_parameters { {-portal_id:required} {-portlet_name:required} @@ -2205,4 +2196,5 @@ append html " \n\n" } + }