Index: openacs-4/packages/acs-subsite/acs-subsite.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/acs-subsite.info,v
diff -u -r1.131.2.5 -r1.131.2.6
--- openacs-4/packages/acs-subsite/acs-subsite.info 17 Apr 2019 07:21:19 -0000 1.131.2.5
+++ openacs-4/packages/acs-subsite/acs-subsite.info 22 Apr 2019 10:10:59 -0000 1.131.2.6
@@ -9,7 +9,7 @@
t
t
-
+
OpenACS
Subsite
2017-08-06
@@ -18,7 +18,7 @@
GPL
3
-
+
Index: openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl,v
diff -u -r1.68.2.1 -r1.68.2.2
--- openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 10 Apr 2019 15:29:52 -0000 1.68.2.1
+++ openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 22 Apr 2019 10:10:59 -0000 1.68.2.2
@@ -390,7 +390,7 @@
@creation-date 2000-02-07
} {
return [db_string sub_type_exists_p {
- select exists (select 1 from acs_object_types
+ select exists (select 1 from acs_object_types
where supertype = :object_type) from dual
}]
}
@@ -1069,21 +1069,41 @@
{-resource_dir ""}
{-streaming_head ""}
{-local_p true}
+ {-create_or_replace:boolean}
} {
Add a new subsite theme, making it available to the theme configuration code.
} {
# the following line is for Oracle compatibility
set local_p [expr {$local_p ? "t" : "f"}]
+ if {$create_or_replace_p
+ && [db_0or1row check_theme {select 1 from subsite_themes where key = :key}]
+ } {
+ subsite::update_subsite_theme \
+ -key $key \
+ -name $name \
+ -template $template \
+ -css $css \
+ -js $js \
+ -form_template $form_template \
+ -list_template $list_template \
+ -list_filter_template $list_filter_template \
+ -dimensional_template $dimensional_template \
+ -resource_dir $resource_dir \
+ -streaming_head $streaming_head \
+ -local_p $local_p
+ return
+ }
+
db_dml insert_subsite_theme {
insert into subsite_themes
(key, name, template, css, js, form_template, list_template,
- list_filter_template, dimensional_template, resource_dir,
- streaming_head, local_p)
+ list_filter_template, dimensional_template, resource_dir,
+ streaming_head, local_p)
values
(:key, :name, :template, :css, :js, :form_template, :list_template,
- :list_filter_template, :dimensional_template, :resource_dir,
- :streaming_head, :local_p)
+ :list_filter_template, :dimensional_template, :resource_dir,
+ :streaming_head, :local_p)
}
}