Index: openacs-4/packages/cms/todo =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/todo,v diff -u -N -r1.7 -r1.7.2.1 --- openacs-4/packages/cms/todo 17 May 2005 21:25:08 -0000 1.7 +++ openacs-4/packages/cms/todo 6 Jun 2005 17:07:23 -0000 1.7.2.1 @@ -1,62 +1,33 @@ -ideas -===== - -perms for multiple sites - - perms on types (see next section), templates (ditto) - - multi site: - - cm_modules: new group per instance -> security_inherit_p context_id = package_id - cms-fix.sql sez: - -- content_module inherit from content_item - -- this way it is possible to grant permissions on content modules - - how about perms on served content? - -serving/editing strategy for multiple sites - - serveroot/cms -> redirects to the cms? - - all other urls are served by index.vuh? - - create a new basic revision for each site upon which other content types will be based - - otherwise, all edits to basic item (content methods, etc.) will affect all sites (actually, not true- UI doesn't allow editing of basic revision) - - set root_key for content types to new basic revision type - - create a new folder for templates and content and set module root_keys to folder_ids - - set root content and template folder contexts to package_id - -admin - - admin tab to select root/root_key for cm_modules (if is not set per instance, redirect to admin tab ala bcms?) - tasks ===== top priority ------------ -set up install procs that set contexts appropriately (done, not thoroughly tested) -clean up www/modules/items/relate-items (remove old table format) +add track_publish_status, update_publish_status to CR, add param for sched interval + - yank plsql exec stuff there now and junk in cms +test instantiate procs that create modules and set contexts basic/cosmetic --------- -list-ize child items (or what to do with it? shouldn't we be able to relate items that already exist?) -better navigation strategy (i.e., "back" links while visiting attributes, rename, delete pages, etc.) -new icon for "clipping" items - competing with new listbuilder checkboxes confuse UI a bit +clean up www/modules/items/relate-items (remove old table format) +new icon for "clipping" items - competing with new listbuilder checkboxes, confuse UI a bit include description in heading on folder attributes page inheritance display should not link to "basic item" on its page and should not include the current type (related to navigation strategy) -move all item info (clip check, title, path, etc.) into an include and put in /lib (with ancestors and bookmark) -combine the index pages for templates and items into one and put in /lib? (if they can be made the same) fix "clear the clipboard" functionality floatclipboard_p working? plumbing -------- +integrate categories and workflow packages build up actions list for folder using allow_* vars (i.e., links? new folders?) on sitemap browser fix search (when i have tsearch2, ie upgrade to rhel4) utilize new cr tcl api where appropriate -use ad_form where appropriate -integrate categories and workflow packages ad_page_contract for non-include pages? select from cm_modules to build tabs? questions/ideas --------- create templates from within folders (in old system)? -generic error page (replace with ad_complain or just pretty up?) -better model for "clipping" items? how do we get extlinks and other types (if any?) which do not sub-class content_revision into the system? comment integration? Index: openacs-4/packages/cms/sql/oracle/cms-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/sql/oracle/cms-create.sql,v diff -u -N -r1.4 -r1.4.2.1 --- openacs-4/packages/cms/sql/oracle/cms-create.sql 9 May 2005 22:44:48 -0000 1.4 +++ openacs-4/packages/cms/sql/oracle/cms-create.sql 6 Jun 2005 17:07:23 -0000 1.4.2.1 @@ -79,7 +79,10 @@ constraint cm_modules_name_nil not null, root_key varchar2(100), - sort_key integer + sort_key integer, + package_id integer + constraint cm_modules_pkg_id_fk + references apm_packages ); comment on column cm_modules.root_key is ' @@ -224,7 +227,15 @@ -- end; -- / -- show errors +-- map subsites to cms package +create table subsite_package_map ( + subsite_id integer, + package_id integer + constraint subsite_package_map_pkg_id_fk references + apm_packages on delete cascade +) + prompt *** Defining utility functions -- Get the alphabetical ordering of a string, based on the first Index: openacs-4/packages/cms/sql/postgresql/cms-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/sql/postgresql/cms-create.sql,v diff -u -N -r1.11.2.1 -r1.11.2.2 --- openacs-4/packages/cms/sql/postgresql/cms-create.sql 18 May 2005 17:13:43 -0000 1.11.2.1 +++ openacs-4/packages/cms/sql/postgresql/cms-create.sql 6 Jun 2005 17:07:23 -0000 1.11.2.2 @@ -299,6 +299,14 @@ -- drop function inline_1 (); +-- map subsites to cms package +create table subsite_package_map ( + subsite_id integer, + package_id integer + constraint subsite_package_map_pkg_id_fk references + apm_packages on delete cascade +) + -- prompt *** Defining utility functions -- Get the alphabetical ordering of a string, based on the first Index: openacs-4/packages/cms/tcl/cms-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/tcl/Attic/cms-init.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/cms/tcl/cms-init.tcl 6 Jun 2005 17:07:23 -0000 1.1.2.1 @@ -0,0 +1,18 @@ +ad_library { + + Schedule a proc to keep track of the publish status. Resets + the publish status to "expired" if the expiration date has passed. + Publishes the item and sets the publish status to "live" if + the current status is "ready" and the scheduled publication time + has passed. + + @creation-date 1 June 2005 + @author Michael Steigman (michael@steigman.net) + @cvs-id $Id: cms-init.tcl,v 1.1.2.1 2005/06/06 17:07:23 michaels Exp $ +} + +# Should be a CR parameter +set interval 120 +ad_schedule_proc -thread t $interval publish::track_publish_status + + Index: openacs-4/packages/cms/tcl/module-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/tcl/module-procs-oracle.xql,v diff -u -N -r1.4 -r1.4.2.1 --- openacs-4/packages/cms/tcl/module-procs-oracle.xql 9 May 2005 22:44:48 -0000 1.4 +++ openacs-4/packages/cms/tcl/module-procs-oracle.xql 6 Jun 2005 17:07:23 -0000 1.4.2.1 @@ -80,23 +80,8 @@ - - - - - select content_template.get_root_folder() from dual - - - - - - select content_item.get_root_folder() from dual - - - - @@ -199,7 +184,7 @@ :root_key, :sort_key, :package_id, -- parent_id - :package_id -- package_id + :package_id -- subsite_id ); end; Index: openacs-4/packages/cms/tcl/module-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/tcl/module-procs-postgresql.xql,v diff -u -N -r1.8 -r1.8.2.1 --- openacs-4/packages/cms/tcl/module-procs-postgresql.xql 9 May 2005 22:44:48 -0000 1.8 +++ openacs-4/packages/cms/tcl/module-procs-postgresql.xql 6 Jun 2005 17:07:23 -0000 1.8.2.1 @@ -80,23 +80,6 @@ - - - - select root_key from cm_modules where key = 'templates' and package_id = :package_id - -- select content_template__get_root_folder() - - - - - - - -- select content_item__get_root_folder(null) - select root_key from cm_modules where key = 'sitemap' and package_id = :package_id - - - - @@ -199,7 +182,7 @@ :root_key, :sort_key, :package_id, -- parent_id - :package_id -- package_id + :package_id -- subsite_id ) Index: openacs-4/packages/cms/tcl/module-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/tcl/module-procs.tcl,v diff -u -N -r1.9 -r1.9.2.1 --- openacs-4/packages/cms/tcl/module-procs.tcl 16 May 2005 22:59:24 -0000 1.9 +++ openacs-4/packages/cms/tcl/module-procs.tcl 6 Jun 2005 17:07:23 -0000 1.9.2.1 @@ -25,6 +25,7 @@ namespace eval workflow { } namespace eval sitemap { } namespace eval types { } + namespace eval items { } namespace eval search { } namespace eval categories { } namespace eval users { } @@ -36,7 +37,7 @@ ad_proc -public cm::modules::get_module_id { -module_name:required - -package_id:required + -subsite_id:required } { Get the id of some module, return empty string on failure @@ -72,25 +73,25 @@ return $result } -ad_proc -public cm::modules::workspace::getRootFolderID { package_id } { return 0 } +ad_proc -public cm::modules::workspace::getRootFolderID { subsite_id } { return 0 } ad_proc -public cm::modules::workspace::getChildFolders { id } { return [list] } -ad_proc -public cm::modules::templates::getRootFolderID { package_id } { +ad_proc -public cm::modules::templates::getRootFolderID { subsite_id } { Retreive the id of the root folder } { - if { ![nsv_exists browser_state template_root_$package_id] } { + if { ![nsv_exists browser_state template_root_$subsite_id] } { set root_id [db_string template_get_root_id ""] - nsv_set browser_state template_root_$package_id $root_id + nsv_set browser_state template_root_$subsite_id $root_id return $root_id } else { - return [nsv_get browser_state template_root_$package_id] + return [nsv_get browser_state template_root_$subsite_id] } } @@ -99,7 +100,7 @@ } { if { [string equal $id {}] } { - set id [getRootFolderID [ad_conn package_id]] + set id [getRootFolderID [ad_conn subsite_id]] } # query for child site nodes @@ -125,17 +126,17 @@ -ad_proc -public cm::modules::sitemap::getRootFolderID { package_id } { +ad_proc -public cm::modules::sitemap::getRootFolderID { subsite_id } { Retreive the id of the root folder } { - if { ![nsv_exists browser_state sitemap_root_$package_id] } { + if { ![nsv_exists browser_state sitemap_root_$subsite_id] } { set root_id [db_string sitemap_get_root_id ""] - nsv_set browser_state sitemap_root_$package_id $root_id + nsv_set browser_state sitemap_root_$subsite_id $root_id return $root_id } else { - return [nsv_get browser_state sitemap_root_$package_id] + return [nsv_get browser_state sitemap_root_$subsite_id] } } @@ -144,7 +145,7 @@ } { if { [string equal $id {}] } { - set id [getRootFolderID [ad_conn package_id]] + set id [getRootFolderID [ad_conn subsite_id]] } # query for child site nodes @@ -185,7 +186,7 @@ return $result } -ad_proc -public cm::modules::types::getRootFolderID { package_id } { return "content_revision" } +ad_proc -public cm::modules::types::getRootFolderID { subsite_id } { return "content_revision" } ad_proc -public cm::modules::types::getChildFolders { id } { @@ -195,7 +196,7 @@ set children [list] if { [string equal $id {}] } { - set id [getRootFolderID [ad_conn package_id]] + set id [getRootFolderID [ad_conn subsite_id]] } # query for message categories @@ -208,14 +209,14 @@ # end of types namespace -ad_proc -public cm::modules::search::getRootFolderID { package_id } { return 0 } +ad_proc -public cm::modules::search::getRootFolderID { subsite_id } { return 0 } ad_proc -public cm::modules::search::getChildFolders { id } { return [list] } -ad_proc -public cm::modules::categories::getRootFolderID { package_id } { return 0 } +ad_proc -public cm::modules::categories::getRootFolderID { subsite_id } { return 0 } ad_proc -public cm::modules::categories::getChildFolders { id } { @@ -295,7 +296,7 @@ -ad_proc -public cm::modules::clipboard::getRootFolderID { package_id } { return 0 } +ad_proc -public cm::modules::clipboard::getRootFolderID { subsite_id } { return 0 } ad_proc -public cm::modules::clipboard::getChildFolders { id } { @@ -318,6 +319,10 @@ # end of clipboard namespace +ad_proc -private cm::modules::items::getRootFolderID { subsite_id } { + return [cm::modules::sitemap::getRootFolderID $subsite_id] +} + ad_proc -private cm::modules::install::create_modules { -package_id:required } { @@ -326,6 +331,7 @@ } { set instance_name [apm_instance_name_from_id $package_id] + set subsite_id [ad_conn subsite_id] set modules [list Sitemap Templates Types Categories Search] set sort_key 0 set root_key "" @@ -336,13 +342,13 @@ "Sitemap" { set root_key [content::folder::new -name pkg_${package_id}_content \ -context_id $package_id \ - -parent_id "-100" \ + -parent_id "0" \ -label "$instance_name $module" ] } "Templates" { set root_key [content::folder::new -name pkg_${package_id}_templates \ -context_id $package_id \ - -parent_id "-200" \ + -parent_id "0" \ -label "$instance_name $module" ] } "Types" { @@ -355,6 +361,7 @@ set module_id [db_exec_plsql create_module {}] # assign context_id of package_id db_dml update_module_context {} + db_dml map_subsite {} } } @@ -365,9 +372,9 @@ Delete modules for a given CMS instance } { - + set subsite_id [ad_conn subsite_id] db_foreach get_module_ids { db_exec_plsql delete_module {} } -} \ No newline at end of file +} Index: openacs-4/packages/cms/tcl/module-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/tcl/module-procs.xql,v diff -u -N -r1.4 -r1.4.2.1 --- openacs-4/packages/cms/tcl/module-procs.xql 9 May 2005 22:44:48 -0000 1.4 +++ openacs-4/packages/cms/tcl/module-procs.xql 6 Jun 2005 17:07:23 -0000 1.4.2.1 @@ -6,7 +6,9 @@ select module_id from cm_modules where key = :module_name - and package_id = :package_id + and package_id = + (select package_id from subsite_package_map + where subsite_id = :subsite_id) @@ -36,15 +38,49 @@ + + + select root_key from cm_modules + where key = 'templates' + and package_id = + (select package_id from subsite_package_map + where subsite_id = :subsite_id) + + + + + + + select root_key from cm_modules + where key = 'sitemap' + and package_id = + (select package_id from subsite_package_map + where subsite_id = :subsite_id) + + + update acs_objects set context_id = :package_id where object_id = :module_id + + + insert into subsite_package_map + (subsite_id,package_id) + values + (:subsite_id,:package_id) + + + - select module_id from cm_modules where package_id = :package_id + select module_id from cm_modules + where key = :module_name + and package_id = + (select package_id from subsite_package_map + where subsite_id = :subsite_id) Index: openacs-4/packages/cms/www/modules/categories/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/categories/index.tcl,v diff -u -N -r1.6 -r1.6.2.1 --- openacs-4/packages/cms/www/modules/categories/index.tcl 16 May 2005 22:59:24 -0000 1.6 +++ openacs-4/packages/cms/www/modules/categories/index.tcl 6 Jun 2005 17:07:23 -0000 1.6.2.1 @@ -13,7 +13,7 @@ set original_id $id -set root_id [cm::modules::${mount_point}::getRootFolderID [ad_conn package_id]] +set root_id [cm::modules::${mount_point}::getRootFolderID [ad_conn subsite_id]] if { [util::is_nil id] || [string equal $id _all_] } { set where_clause "k.parent_id is null" } else { @@ -95,5 +95,5 @@ } set id $keyword_id set keyword_url [export_vars -base index?mount_point=categories { id parent_id }] - set copy [clipboard::render_bookmark categories $keyword_id [ad_conn package_url]] + set copy [clipboard::ui::render_bookmark categories $keyword_id [ad_conn package_url]] } Index: openacs-4/packages/cms/www/modules/categories/keyword-assign.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/categories/keyword-assign.tcl,v diff -u -N -r1.4 -r1.4.2.1 --- openacs-4/packages/cms/www/modules/categories/keyword-assign.tcl 16 May 2005 22:59:24 -0000 1.4 +++ openacs-4/packages/cms/www/modules/categories/keyword-assign.tcl 6 Jun 2005 17:07:23 -0000 1.4.2.1 @@ -7,7 +7,7 @@ -optional -value "sitemap" if { [template::util::is_nil item_id] } { - set resolved_id [cm::modules::${mount_point}::getRootFolderID [ad_conn package_id]] + set resolved_id [cm::modules::${mount_point}::getRootFolderID [ad_conn subsite_id]] } else { set resolved_id $item_id } Index: openacs-4/packages/cms/www/modules/categories/keyword-unassign.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/categories/keyword-unassign.tcl,v diff -u -N -r1.3 -r1.3.2.1 --- openacs-4/packages/cms/www/modules/categories/keyword-unassign.tcl 16 May 2005 22:59:24 -0000 1.3 +++ openacs-4/packages/cms/www/modules/categories/keyword-unassign.tcl 6 Jun 2005 17:07:23 -0000 1.3.2.1 @@ -8,7 +8,7 @@ -optional -value "sitemap" if { [template::util::is_nil item_id] } { - set resolved_id [cm::modules::${mount_point}::getRootFolderID [ad_conn package_id]] + set resolved_id [cm::modules::${mount_point}::getRootFolderID [ad_conn subsite_id]] } else { set resolved_id $item_id } Index: openacs-4/packages/cms/www/modules/clipboard/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/clipboard/index.tcl,v diff -u -N -r1.6 -r1.6.2.1 --- openacs-4/packages/cms/www/modules/clipboard/index.tcl 9 May 2005 22:44:48 -0000 1.6 +++ openacs-4/packages/cms/www/modules/clipboard/index.tcl 6 Jun 2005 17:07:23 -0000 1.6.2.1 @@ -49,7 +49,7 @@ if { [catch { cm::modules::${id}::getSortedPaths items $item_id_list \ - [cm::modules::${id}::getRootFolderID [ad_conn package_id]] + [cm::modules::${id}::getRootFolderID [ad_conn subsite_id]] template::multirow extend items url template::multirow foreach items { Index: openacs-4/packages/cms/www/modules/items/assign-keywords.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/assign-keywords.tcl,v diff -u -N -r1.4 -r1.4.2.1 --- openacs-4/packages/cms/www/modules/items/assign-keywords.tcl 16 May 2005 22:59:24 -0000 1.4 +++ openacs-4/packages/cms/www/modules/items/assign-keywords.tcl 6 Jun 2005 17:07:23 -0000 1.4.2.1 @@ -12,7 +12,7 @@ -object_id $id -privilege write if { [template::util::is_nil id] } { - set root_id [cm::modules::${mount_point}::getRootFolderID [ad_conn package_id]] + set root_id [cm::modules::${mount_point}::getRootFolderID [ad_conn subsite_id]] } else { set root_id $id } Index: openacs-4/packages/cms/www/modules/items/create-1.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/create-1.tcl,v diff -u -N -r1.5 -r1.5.2.1 --- openacs-4/packages/cms/www/modules/items/create-1.tcl 16 May 2005 22:59:24 -0000 1.5 +++ openacs-4/packages/cms/www/modules/items/create-1.tcl 6 Jun 2005 17:07:23 -0000 1.5.2.1 @@ -10,7 +10,7 @@ # Manually set the value since the templating system is still broken in # the -value flag if { [template::util::is_nil parent_id] } { - set parent_id [cm::modules::${mount_point}::getRootFolderID [ad_conn package_id]] + set parent_id [cm::modules::${mount_point}::getRootFolderID [ad_conn subsite_id]] } permission::require_permission -party_id [auth::require_login] \ Index: openacs-4/packages/cms/www/modules/items/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/index.tcl,v diff -u -N -r1.9 -r1.9.2.1 --- openacs-4/packages/cms/www/modules/items/index.tcl 16 May 2005 22:59:24 -0000 1.9 +++ openacs-4/packages/cms/www/modules/items/index.tcl 6 Jun 2005 17:07:23 -0000 1.9.2.1 @@ -52,4 +52,4 @@ # The root ID is to determine the appropriate path to the item -set root_id [cm::modules::${mount_point}::getRootFolderID [ad_conn package_id]] +set root_id [cm::modules::${mount_point}::getRootFolderID [ad_conn subsite_id]] Index: openacs-4/packages/cms/www/modules/sitemap/ancestors.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/ancestors.tcl,v diff -u -N -r1.11 -r1.11.2.1 --- openacs-4/packages/cms/www/modules/sitemap/ancestors.tcl 9 May 2005 22:44:49 -0000 1.11 +++ openacs-4/packages/cms/www/modules/sitemap/ancestors.tcl 6 Jun 2005 17:07:24 -0000 1.11.2.1 @@ -10,7 +10,7 @@ index_page_id -datatype integer -optional } -set root_id [cm::modules::${mount_point}::getRootFolderID [ad_conn package_id]] +set root_id [cm::modules::${mount_point}::getRootFolderID [ad_conn subsite_id]] set root_title [item::get_title $root_id] # special case - when the item_id is null, set it to the root folder Index: openacs-4/packages/cms/www/modules/sitemap/attributes.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/attributes.tcl,v diff -u -N -r1.10 -r1.10.2.1 --- openacs-4/packages/cms/www/modules/sitemap/attributes.tcl 9 May 2005 22:44:49 -0000 1.10 +++ openacs-4/packages/cms/www/modules/sitemap/attributes.tcl 6 Jun 2005 17:07:24 -0000 1.10.2.1 @@ -11,7 +11,7 @@ # default folder_id is the root folder if { [template::util::is_nil folder_id] } { - set folder_id [cm::modules::${mount_point}::getRootFolderID [ad_conn package_id]] + set folder_id [cm::modules::${mount_point}::getRootFolderID [ad_conn subsite_id]] } if { [template::util::is_nil folder_resolved_id] } { Index: openacs-4/packages/cms/www/modules/sitemap/copy.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/copy.tcl,v diff -u -N -r1.7 -r1.7.2.1 --- openacs-4/packages/cms/www/modules/sitemap/copy.tcl 16 May 2005 22:59:24 -0000 1.7 +++ openacs-4/packages/cms/www/modules/sitemap/copy.tcl 6 Jun 2005 17:07:24 -0000 1.7.2.1 @@ -5,7 +5,7 @@ request set_param mount_point -datatype keyword -value sitemap -set root_id [cm::modules::${mount_point}::getRootFolderID [ad_conn package_id]] +set root_id [cm::modules::${mount_point}::getRootFolderID [ad_conn subsite_id]] if { [template::util::is_nil folder_id] } { set folder_id $root_id } Index: openacs-4/packages/cms/www/modules/sitemap/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/index.tcl,v diff -u -N -r1.12 -r1.12.2.1 --- openacs-4/packages/cms/www/modules/sitemap/index.tcl 9 May 2005 22:44:49 -0000 1.12 +++ openacs-4/packages/cms/www/modules/sitemap/index.tcl 6 Jun 2005 17:07:24 -0000 1.12.2.1 @@ -16,8 +16,8 @@ set original_folder_id $folder_id set user_id [auth::require_login] -set package_id [ad_conn package_id] -set root_id [cm::modules::${mount_point}::getRootFolderID $package_id] +set subsite_id [ad_conn subsite_id] +set root_id [cm::modules::${mount_point}::getRootFolderID $subsite_id] # Get the folder label/description # If :id does not exist, then use :root_id @@ -154,7 +154,7 @@ # if the folder_id is empty, then it must be the root folder if { [template::util::is_nil folder_id] } { - set folder_id [cm::modules::${mount_point}::getRootFolderID [ad_conn package_id]] + set folder_id [cm::modules::${mount_point}::getRootFolderID [ad_conn subsite_id]] } else { set folder_id $original_folder_id } Index: openacs-4/packages/cms/www/modules/sitemap/index.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/index.xql,v diff -u -N -r1.5 -r1.5.2.1 --- openacs-4/packages/cms/www/modules/sitemap/index.xql 9 May 2005 22:44:49 -0000 1.5 +++ openacs-4/packages/cms/www/modules/sitemap/index.xql 6 Jun 2005 17:07:24 -0000 1.5.2.1 @@ -4,15 +4,15 @@ - select module_id from cm_modules where key = 'sitemap' and package_id = :package_id + select module_id from cm_modules where key = 'sitemap' and subsite_id = :subsite_id - select name from cm_modules where key = :mount_point and package_id = :package_id + select name from cm_modules where key = :mount_point and subsite_id = :subsite_id Index: openacs-4/packages/cms/www/modules/sitemap/move.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/move.tcl,v diff -u -N -r1.7 -r1.7.2.1 --- openacs-4/packages/cms/www/modules/sitemap/move.tcl 16 May 2005 22:59:24 -0000 1.7 +++ openacs-4/packages/cms/www/modules/sitemap/move.tcl 6 Jun 2005 17:07:24 -0000 1.7.2.1 @@ -5,7 +5,7 @@ request set_param mount_point -datatype keyword -value sitemap -set root_id [cm::modules::${mount_point}::getRootFolderID [ad_conn package_id]] +set root_id [cm::modules::${mount_point}::getRootFolderID [ad_conn subsite_id]] if { [template::util::is_nil id] } { set folder_id $root_id } else { @@ -67,7 +67,7 @@ if { [form is_valid move] } { - set root_id [cm::modules::${mount_point}::getRootFolderID [ad_conn package_id]] + set root_id [cm::modules::${mount_point}::getRootFolderID [ad_conn subsite_id]] form get_values move id mount_point set moved_items [element get_values move moved_items] Index: openacs-4/packages/cms/www/modules/sitemap/symlink.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/symlink.tcl,v diff -u -N -r1.8 -r1.8.2.1 --- openacs-4/packages/cms/www/modules/sitemap/symlink.tcl 16 May 2005 22:59:24 -0000 1.8 +++ openacs-4/packages/cms/www/modules/sitemap/symlink.tcl 6 Jun 2005 17:07:24 -0000 1.8.2.1 @@ -10,7 +10,7 @@ if { [template::util::is_nil id] } { - set folder_id [cm::modules::${mount_point}::getRootFolderID [ad_conn package_id]] + set folder_id [cm::modules::${mount_point}::getRootFolderID [ad_conn subsite_id]] } else { set folder_id $id } Index: openacs-4/packages/cms/www/modules/templates/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/index.tcl,v diff -u -N -r1.9 -r1.9.2.1 --- openacs-4/packages/cms/www/modules/templates/index.tcl 9 May 2005 22:44:49 -0000 1.9 +++ openacs-4/packages/cms/www/modules/templates/index.tcl 6 Jun 2005 17:07:24 -0000 1.9.2.1 @@ -28,7 +28,7 @@ } else { if { [string equal $folder_id {}] } { - set folder_id [cm::modules::templates::getRootFolderID [ad_conn package_id]] + set folder_id [cm::modules::templates::getRootFolderID [ad_conn subsite_id]] } set path [db_string get_path ""] Index: openacs-4/packages/cms/www/modules/templates/new-folder.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/new-folder.tcl,v diff -u -N -r1.8 -r1.8.2.1 --- openacs-4/packages/cms/www/modules/templates/new-folder.tcl 16 May 2005 22:59:24 -0000 1.8 +++ openacs-4/packages/cms/www/modules/templates/new-folder.tcl 6 Jun 2005 17:07:24 -0000 1.8.2.1 @@ -1,6 +1,6 @@ request create -params { parent_id -datatype integer -optional \ - -value [cm::modules::templates::getRootFolderID [ad_conn package_id]] + -value [cm::modules::templates::getRootFolderID [ad_conn subsite_id]] } set path [db_string get_path ""] Index: openacs-4/packages/cms/www/modules/templates/template-create.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/template-create.tcl,v diff -u -N -r1.6 -r1.6.2.1 --- openacs-4/packages/cms/www/modules/templates/template-create.tcl 16 May 2005 22:59:24 -0000 1.6 +++ openacs-4/packages/cms/www/modules/templates/template-create.tcl 6 Jun 2005 17:07:24 -0000 1.6.2.1 @@ -6,7 +6,7 @@ # Cannot use -value due to negative values if { [template::util::is_nil parent_id] } { - set parent_id [cm::modules::templates::getRootFolderID [ad_conn package_id]] + set parent_id [cm::modules::templates::getRootFolderID [ad_conn subsite_id]] } set folder_name [db_string get_folder_name "" -default ""] @@ -43,7 +43,7 @@ set ip_address [ns_conn peeraddr] if { [util::is_nil parent_id] } { - set parent_id [cm::modules::templates::getRootFolderID [ad_conn package_id]] + set parent_id [cm::modules::templates::getRootFolderID [ad_conn subsite_id]] } db_transaction { Index: openacs-4/packages/cms/www/modules/templates/template.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/template.tcl,v diff -u -N -r1.6 -r1.6.2.1 --- openacs-4/packages/cms/www/modules/templates/template.tcl 16 May 2005 22:59:24 -0000 1.6 +++ openacs-4/packages/cms/www/modules/templates/template.tcl 6 Jun 2005 17:07:24 -0000 1.6.2.1 @@ -14,7 +14,7 @@ } # The root ID is to determine the appropriate path to the item -set root_id [cm::modules::templates::getRootFolderID [ad_conn package_id]] +set root_id [cm::modules::templates::getRootFolderID [ad_conn subsite_id]] # resolve any symlinks Index: openacs-4/packages/cms/www/modules/types/content-method.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/content-method.tcl,v diff -u -N -r1.8.2.1 -r1.8.2.2 --- openacs-4/packages/cms/www/modules/types/content-method.tcl 18 May 2005 15:13:12 -0000 1.8.2.1 +++ openacs-4/packages/cms/www/modules/types/content-method.tcl 6 Jun 2005 17:07:24 -0000 1.8.2.2 @@ -4,7 +4,7 @@ # permissions check - user must have read on the types module permission::require_permission -party_id [auth::require_login] \ - -object_id [cm::modules::get_module_id -module_name types -package_id [ad_conn package_id]] -privilege read + -object_id [cm::modules::get_module_id -module_name types -subsite_id [ad_conn subsite_id]] -privilege read # default return_url if { [template::util::is_nil return_url] } { Index: openacs-4/packages/cms/www/modules/types/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/index.tcl,v diff -u -N -r1.10 -r1.10.2.1 --- openacs-4/packages/cms/www/modules/types/index.tcl 16 May 2005 22:59:25 -0000 1.10 +++ openacs-4/packages/cms/www/modules/types/index.tcl 6 Jun 2005 17:07:24 -0000 1.10.2.1 @@ -17,10 +17,10 @@ request set_param mount_point -datatype keyword -value types request set_param type_props_tab -datatype keyword -optional -value attributes -set root_id [cm::modules::templates::getRootFolderID [ad_conn package_id]] +set root_id [cm::modules::templates::getRootFolderID [ad_conn subsite_id]] set user_id [auth::require_login] -set module_id [cm::modules::get_module_id -module_name types -package_id [ad_conn package_id]] +set module_id [cm::modules::get_module_id -module_name types -subsite_id [ad_conn subsite_id]] permission::require_permission -party_id $user_id \ -object_id $module_id -privilege read Index: openacs-4/packages/cms/www/modules/types/mime-types.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/mime-types.tcl,v diff -u -N -r1.7.2.1 -r1.7.2.2 --- openacs-4/packages/cms/www/modules/types/mime-types.tcl 18 May 2005 15:13:12 -0000 1.7.2.1 +++ openacs-4/packages/cms/www/modules/types/mime-types.tcl 6 Jun 2005 17:07:24 -0000 1.7.2.2 @@ -6,7 +6,7 @@ request set_param content_type -datatype keyword -value 'content_revision' permission::require_permission -party_id [auth::require_login] \ - -object_id [cm::modules::get_module_id -module_name types -package_id [ad_conn package_id]] -privilege read + -object_id [cm::modules::get_module_id -module_name types -subsite_id [ad_conn subsite_id]] -privilege read set content_type_name [db_string get_name ""] Index: openacs-4/packages/cms/www/modules/types/relation-register.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/relation-register.tcl,v diff -u -N -r1.8.2.1 -r1.8.2.2 --- openacs-4/packages/cms/www/modules/types/relation-register.tcl 18 May 2005 15:13:12 -0000 1.8.2.1 +++ openacs-4/packages/cms/www/modules/types/relation-register.tcl 6 Jun 2005 17:07:24 -0000 1.8.2.2 @@ -4,7 +4,7 @@ request set_param type_props_tab -datatype text -optional -value relations permission::require_permission -party_id [auth::require_login] \ - -object_id [cm::modules::get_module_id -module_name types -package_id [ad_conn package_id]] -privilege write + -object_id [cm::modules::get_module_id -module_name types -subsite_id [ad_conn subsite_id]] -privilege write form create relation -elements { rel_type -datatype keyword -widget hidden -param Index: openacs-4/packages/cms/www/modules/types/relation-unregister.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/relation-unregister.tcl,v diff -u -N -r1.8.2.1 -r1.8.2.2 --- openacs-4/packages/cms/www/modules/types/relation-unregister.tcl 18 May 2005 15:13:12 -0000 1.8.2.1 +++ openacs-4/packages/cms/www/modules/types/relation-unregister.tcl 6 Jun 2005 17:07:24 -0000 1.8.2.2 @@ -10,7 +10,7 @@ request set_param relation_tag -datatype text -value "" permission::require_permission -party_id [auth::require_login] \ - -object_id [cm::modules::get_module_id -module_name types -package_id [ad_conn package_id]] -privilege write + -object_id [cm::modules::get_module_id -module_name types -subsite_id [ad_conn subsite_id]] -privilege write if { [string equal $rel_type child_rel] } { Index: openacs-4/packages/cms/www/modules/types/relations.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/relations.tcl,v diff -u -N -r1.8 -r1.8.2.1 --- openacs-4/packages/cms/www/modules/types/relations.tcl 16 May 2005 22:59:25 -0000 1.8 +++ openacs-4/packages/cms/www/modules/types/relations.tcl 6 Jun 2005 17:07:24 -0000 1.8.2.1 @@ -7,7 +7,7 @@ request set_param type_props_tab -datatype text -optional -value attributes permission::require_permission -party_id [auth::require_login] \ - -object_id [cm::modules::get_module_id -module_name types -package_id [ad_conn package_id]] -privilege read + -object_id [cm::modules::get_module_id -module_name types -subsite_id [ad_conn subsite_id]] -privilege read template::list::create \ -name rel_types \ Index: openacs-4/packages/cms/www/modules/types/unregister-mime-type.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/unregister-mime-type.tcl,v diff -u -N -r1.5.2.1 -r1.5.2.2 --- openacs-4/packages/cms/www/modules/types/unregister-mime-type.tcl 18 May 2005 15:13:12 -0000 1.5.2.1 +++ openacs-4/packages/cms/www/modules/types/unregister-mime-type.tcl 6 Jun 2005 17:07:24 -0000 1.5.2.2 @@ -10,7 +10,7 @@ db_transaction { permission::require_permission -party_id [auth::require_login] \ - -object_id [cm::modules::get_module_id -module_name types -package_id [ad_conn package_id]] -privilege write + -object_id [cm::modules::get_module_id -module_name types -subsite_id [ad_conn subsite_id]] -privilege write db_exec_plsql unregister_mime_type {} Index: openacs-4/packages/cms/www/modules/types/widget-register.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/widget-register.tcl,v diff -u -N -r1.8.2.1 -r1.8.2.2 --- openacs-4/packages/cms/www/modules/types/widget-register.tcl 18 May 2005 15:13:12 -0000 1.8.2.1 +++ openacs-4/packages/cms/www/modules/types/widget-register.tcl 6 Jun 2005 17:07:24 -0000 1.8.2.2 @@ -6,7 +6,7 @@ request set_param widget -datatype keyword -optional permission::require_permission -party_id [auth::require_login] \ - -object_id [cm::modules::get_module_id -module_name types -package_id [ad_conn package_id]] -privilege write + -object_id [cm::modules::get_module_id -module_name types -subsite_id [ad_conn subsite_id]] -privilege write wizard set_param attribute_id $attribute_id wizard set_param content_type $content_type Index: openacs-4/packages/cms/www/modules/types/widget-unregister.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/types/widget-unregister.tcl,v diff -u -N -r1.6 -r1.6.2.1 --- openacs-4/packages/cms/www/modules/types/widget-unregister.tcl 16 May 2005 17:38:19 -0000 1.6 +++ openacs-4/packages/cms/www/modules/types/widget-unregister.tcl 6 Jun 2005 17:07:24 -0000 1.6.2.1 @@ -2,7 +2,7 @@ request set_param attribute_id -datatype integer permission::require_permission -party_id [auth::require_login] \ - -object_id [cm::modules::get_module_id -module_name types -package_id [ad_conn package_id]] -privilege write + -object_id [cm::modules::get_module_id -module_name types -subsite_id [ad_conn subsite_id]] -privilege write db_1row get_attr_info ""