Index: openacs-4/packages/new-portal/www/element-layout.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/www/Attic/element-layout.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/new-portal/www/element-layout.tcl 28 Sep 2001 21:42:30 -0000 1.1 +++ openacs-4/packages/new-portal/www/element-layout.tcl 5 Oct 2001 02:23:34 -0000 1.2 @@ -25,12 +25,12 @@ } -column_array portal # fake some elements so that the in the template has something to do. -foreach region [ portal_get_regions $portal(layout_id) ] { +foreach region [ portal::get_regions $portal(layout_id) ] { # pass the portal_id along here instead of the element_id. lappend fake_element_ids($region) $portal_id } set element_list [array get fake_element_ids] -set element_src "[portal_path]/www/place-element" +set element_src "[portal::portal_path]/www/place-element" ad_return_template Index: openacs-4/packages/new-portal/www/place-element.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/www/place-element.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/new-portal/www/place-element.tcl 30 Sep 2001 18:58:41 -0000 1.4 +++ openacs-4/packages/new-portal/www/place-element.tcl 5 Oct 2001 02:23:46 -0000 1.5 @@ -21,7 +21,7 @@ set portal_id $element_id # can this region be edited? -if { [portal_region_immutable_p $region] } { +if { [portal::region_immutable_p $region] } { set immutable_p 1 set would_be_immutable_p 0 } else { @@ -41,7 +41,7 @@ order by pe.sort_key" \ { template::multirow append element_multi $element_id $name $sort_key - if {![portal_region_immutable_p $region]} { + if {![portal::region_immutable_p $region]} { incr region_count } } Index: openacs-4/packages/new-portal/www/portal-ae-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/www/Attic/portal-ae-2.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/new-portal/www/portal-ae-2.tcl 29 Sep 2001 18:09:36 -0000 1.3 +++ openacs-4/packages/new-portal/www/portal-ae-2.tcl 5 Oct 2001 02:24:11 -0000 1.4 @@ -12,61 +12,8 @@ portal_id:naturalnum,notnull } -# XXX permission filter? The vars are in the URL !!! BAD! +# XXX we are not creating portals here anymore, just redirect +# permission filter? The vars are in the URL !!! BAD! -set user_id [ad_conn user_id] -set master_template [ad_parameter master_template] - -db_transaction { - # does the portal exist? - if { [portal_exists_p $portal_id] } { - - # aks - update the vars XXX fixme - } else { - - # portal doesn't exist yet. Create it. - - # undefined name? - this should not happen - aks - if { ! [info exists name] } { - set name "Untitled Portal" - } - - # insert the portal and grant permission on it. - db_exec_plsql insert_portal { - declare - - pid portals.portal_id%TYPE; - - begin - - pid := portal.new ( - portal_id => :portal_id, - name => :name, - layout_id => :layout_id, - owner_id => :user_id - ); - - acs_permission.grant_permission ( - object_id => pid, - grantee_id => :user_id, - privilege => 'read' - ); - - acs_permission.grant_permission ( - object_id => pid, - grantee_id => :user_id, - privilege => 'write' - ); - - acs_permission.grant_permission ( - object_id => pid, - grantee_id => :user_id, - privilege => 'admin' - ); - end; - } - } -} - ns_returnredirect "element-layout?[export_url_vars portal_id]"