Index: openacs-4/packages/static-portlet/tcl/static-portal-content-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-portlet/tcl/static-portal-content-procs-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/static-portlet/tcl/static-portal-content-procs-oracle.xql 21 Jul 2002 20:06:07 -0000 1.1 @@ -0,0 +1,19 @@ + + + +oracle8.1.6 + + + + declare + begin + :1 := static_portal_content_item.new( + package_id => :package_id, + content => :content, + pretty_name => :pretty_name + ); + end; + + + + Index: openacs-4/packages/static-portlet/tcl/static-portal-content-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-portlet/tcl/static-portal-content-procs-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/static-portlet/tcl/static-portal-content-procs-postgresql.xql 21 Jul 2002 20:06:07 -0000 1.1 @@ -0,0 +1,18 @@ + + + +postgresql7.1 + + + + begin + select static_portal_content_item__new( + :package_id, + :content, + :pretty_name + ); + end; + + + + Index: openacs-4/packages/static-portlet/tcl/static-portal-content-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-portlet/tcl/static-portal-content-procs.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/static-portlet/tcl/static-portal-content-procs.tcl 29 May 2002 23:00:26 -0000 1.10 +++ openacs-4/packages/static-portlet/tcl/static-portal-content-procs.tcl 21 Jul 2002 20:06:07 -0000 1.11 @@ -36,16 +36,7 @@ Calls the pl/sql to create the new content item } { # Create the content item - set content_id [db_exec_plsql new_content_item " - declare - begin - :1 := static_portal_content_item.new( - package_id => :package_id, - content => :content, - pretty_name => :pretty_name - ); - end; - "] + set content_id [db_exec_plsql new_content_item {}] # Ben's style only cause he was editing here and then changed things back return $content_id @@ -124,21 +115,10 @@ } { set ds_id [portal::get_datasource_id [static_portlet::get_my_name]] - set element_list [db_list get_element_list { - select pem.element_id as element_id - from portal_element_map pem, portal_pages pp - where pp.portal_id= :portal_id - and pp.page_id = pem.page_id - and pem.datasource_id= :ds_id - }] + set element_list [db_list get_element_list {}] foreach element_id $element_list { - set old_content_id [db_string select_element_id { - select value - from portal_element_parameters - where element_id = :element_id - and key = 'content_id'} - ] + set old_content_id [db_string select_element_id {}] # make a new static content item from this item set new_content_id [new \ @@ -179,11 +159,7 @@ } { updates the content item } { - return [db_dml update_content_item { - update static_portal_content set - content = :content, pretty_name = :pretty_name - where content_id = :content_id - }] + return [db_dml update_content_item {}] } @@ -203,11 +179,7 @@ } { Get the pretty_name of the item } { - return [db_string get_pretty_name.select { - select pretty_name - from static_portal_content - where content_id = :content_id - }] + return [db_string get_pretty_name.select {}] } ad_proc -public get_content { @@ -227,11 +199,7 @@ } { Get the package_id of the item } { - return [db_string get_package_id.select { - select package_id - from static_portal_content - where content_id = :content_id - }] + return [db_string get_package_id.select {}] } } Index: openacs-4/packages/static-portlet/tcl/static-portal-content-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-portlet/tcl/static-portal-content-procs.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/static-portlet/tcl/static-portal-content-procs.xql 21 Jul 2002 20:06:07 -0000 1.1 @@ -0,0 +1,49 @@ + + + + + + + select pem.element_id as element_id + from portal_element_map pem, portal_pages pp + where pp.portal_id= :portal_id + and pp.page_id = pem.page_id + and pem.datasource_id= :ds_id + + + + + + select value + from portal_element_parameters + where element_id = :element_id + and key = 'content_id' + + + + + + update static_portal_content set + content = :content, pretty_name = :pretty_name + where content_id = :content_id + + + + + + select pretty_name + from static_portal_content + where content_id = :content_id + + + + + + select package_id + from static_portal_content + where content_id = :content_id + + + + +