Commit 515e5962 authored by Frank Bergmann's avatar Frank Bergmann

- V4.0.3.0.0:

  Updated to OpenACS 5.7
parent 81e9ca28
......@@ -7,10 +7,10 @@
<initial-install-p>t</initial-install-p>
<singleton-p>t</singleton-p>
<version name="5.6.0" url="http://openacs.org/repository/download/apm/acs-content-repository-5.6.0.apm">
<version name="5.7.0" url="http://openacs.org/repository/download/apm/acs-content-repository-5.7.0.apm">
<owner url="http://openacs.org">OpenACS</owner>
<summary>The canonical repository for OpenACS content.</summary>
<release-date>2010-06-17</release-date>
<release-date>2011-06-12</release-date>
<maturity>3</maturity>
<vendor url="http://openacs.org">OpenACS</vendor>
<description format="text/html">Provides the API for creating and managing user generated content including
......@@ -20,10 +20,10 @@
<license>GPL</license>
<maturity>3</maturity>
<provides url="acs-content-repository" version="5.6.0"/>
<requires url="acs-kernel" version="5.6.0"/>
<requires url="acs-service-contract" version="5.6.0"/>
<requires url="search" version="5.6.0"/>
<provides url="acs-content-repository" version="5.7.0"/>
<requires url="acs-kernel" version="5.7.0"/>
<requires url="acs-service-contract" version="5.7.0"/>
<requires url="search" version="5.7.0"/>
<callbacks>
<callback type="after-upgrade" proc="content::apm::after_upgrade"/>
......
......@@ -195,20 +195,5 @@ drop table cr_content_mime_type_map ;
drop table cr_mime_types ;
-- dropping ats datatypes for cms
begin
delete from acs_datatypes where datatype in ('text');
delete from acs_datatypes where datatype in ('keyword');
delete from acs_datatypes where datatype in ('integer');
commit;
end;
/
show errors
......@@ -283,6 +283,22 @@ begin
pretty_plural => 'Language'
);
attr_id := content_type.create_attribute (
content_type => 'content_revision',
attribute_name => 'item_id',
datatype => 'integer',
pretty_name => 'Item id',
pretty_plural => 'Item ids'
);
attr_id := content_type.create_attribute (
content_type => 'content_revision',
attribute_name => 'content',
datatype => 'text',
pretty_name => 'content',
pretty_plural => 'content'
);
end;
/
show errors
......
......@@ -208,17 +208,3 @@ drop table cr_content_mime_type_map ;
drop table cr_mime_types ;
-- dropping ats datatypes for cms
begin;
delete from acs_datatypes where datatype in ('text');
delete from acs_datatypes where datatype in ('keyword');
delete from acs_datatypes where datatype in ('integer');
commit;
......@@ -53,7 +53,7 @@ declare
begin
if new__parent_id is null then
v_parent_id := content_template_globals.c_root_folder_id;
select c_root_folder_id into v_parent_id from content_template_globals;
else
v_parent_id := new__parent_id;
end if;
......@@ -133,7 +133,7 @@ declare
begin
if new__parent_id is null then
v_parent_id := content_template_globals.c_root_folder_id;
select c_root_folder_id into v_parent_id from content_template_globals;
else
v_parent_id := new__parent_id;
end if;
......
......@@ -93,7 +93,9 @@ begin
null,
''f'',
null,
create_type__name_method
create_type__name_method,
v_temp_p,
''f''
);
PERFORM content_type__refresh_view(create_type__content_type);
......@@ -324,8 +326,6 @@ begin
return 0;
end;' language 'plpgsql';
select define_function_args('content_type__create_attribute','content_type,attribute_name,datatype,pretty_name,pretty_plural,sort_order,default_value,column_spec;text');
create or replace function content_type__create_attribute (varchar,varchar,varchar,varchar,varchar,integer,varchar,varchar)
......@@ -359,12 +359,6 @@ begin
and c.oid = a.attrelid
and a.attname = lower(create_attribute__attribute_name);
if NOT v_column_exists then
execute ''alter table '' || v_table_name || '' add '' ||
create_attribute__attribute_name || '' ''
|| create_attribute__column_spec;
end if;
v_attr_id := acs_attribute__create_attribute (
create_attribute__content_type,
create_attribute__attribute_name,
......@@ -378,7 +372,14 @@ begin
1,
create_attribute__sort_order,
''type_specific'',
''f''
''f'',
not v_column_exists,
null,
null,
null,
null,
null,
create_attribute__column_spec
);
PERFORM content_type__refresh_view(create_attribute__content_type);
......@@ -387,7 +388,6 @@ begin
end;' language 'plpgsql';
select define_function_args('content_type__drop_attribute','content_type,attribute_name,drop_column;f');
create or replace function content_type__drop_attribute (varchar,varchar,boolean)
......
......@@ -376,6 +376,28 @@ begin;
'text'
);
select content_type__create_attribute (
'content_revision',
'item_id',
'integer',
'Item id',
'Item ids',
null,
null,
'integer'
);
select content_type__create_attribute (
'content_revision',
'content',
'text',
'Content',
'Content',
null,
null,
'text'
);
end;
-- Declare standard relationships with children and other items
......
......@@ -286,7 +286,7 @@ ad_proc -public content::type::rotate_template {
ad_proc -public content::type::set_default_template {
-content_type:required
-template_id:required
{use_context: "public"}
{use_context "public"}
} {
@param content_type
@param template_id
......
......@@ -25,7 +25,7 @@ ad_proc -public image::new {
{-package_id ""}
{-creation_ip ""}
{-item_subtype "content_item"}
{-content_type "content_revision"}
{-content_type "image"}
{-title ""}
{-description ""}
{-mime_type ""}
......@@ -58,7 +58,6 @@ ad_proc -public image::new {
@error
} {
ns_log notice "IMAGE::NEW"
if {$width eq "" || $height eq ""} {
foreach {width height} [image::get_file_dimensions \
-filename $tmp_filename \
......@@ -82,7 +81,7 @@ ns_log notice "IMAGE::NEW"
-package_id $package_id \
-creation_ip $creation_ip \
-item_subtype $item_subtype \
-content_type "image" \
-content_type $content_type \
-title $title \
-description $description \
-mime_type $mime_type \
......
......@@ -92,7 +92,7 @@ ad_proc -public cr_write_content {
ns_set put [ns_conn outputheaders] "Content-Length" 0
ns_return 200 text/plain {}
} else {
if {[info procs ad_returnfile_background] eq "" || [security::secure_conn_p]} {
if {[info command ad_returnfile_background] eq "" || [security::secure_conn_p]} {
ns_returnfile 200 $mime_type $filename
} else {
ad_returnfile_background 200 $mime_type $filename
......
......@@ -20,11 +20,6 @@ ad_proc content_search__datasource {
and i.item_id = r.item_id
" -column_array datasource
if { $datasource(storage_type) ne "lob" } {
set datasource(storage_type) "text"
set datasource(content) [cr_write_content -string -revision_id $object_id ]
}
return [array get datasource]
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment