Index: openacs-4/packages/acs-content-repository/acs-content-repository.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/acs-content-repository.info,v diff -u -N -r1.84.2.4 -r1.84.2.5 --- openacs-4/packages/acs-content-repository/acs-content-repository.info 17 Jul 2009 11:48:31 -0000 1.84.2.4 +++ openacs-4/packages/acs-content-repository/acs-content-repository.info 20 Jul 2009 12:24:47 -0000 1.84.2.5 @@ -7,7 +7,7 @@ t t - + OpenACS The canonical repository for OpenACS content. 2009-06-19 @@ -20,13 +20,15 @@ GPL 3 - + + + Index: openacs-4/packages/acs-content-repository/sql/common/mime-type-data.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/common/mime-type-data.sql,v diff -u -N -r1.9 -r1.9.4.1 --- openacs-4/packages/acs-content-repository/sql/common/mime-type-data.sql 17 May 2007 10:09:42 -0000 1.9 +++ openacs-4/packages/acs-content-repository/sql/common/mime-type-data.sql 20 Jul 2009 12:24:47 -0000 1.9.4.1 @@ -194,6 +194,15 @@ insert into cr_mime_types (mime_type, file_extension, label) values ('application/vnd.oasis.opendocument.database', 'odb', 'OpenDocument Database'); insert into cr_mime_types (mime_type, file_extension, label) values ('application/vnd.oasis.opendocument.image', 'odi', 'OpenDocument Image'); +-- Open XML formats for MS-Office +insert into cr_mime_types (mime_type, file_extension, label) values ('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xlsx', 'Microsoft Office Excel'); +insert into cr_mime_types (mime_type, file_extension, label) values ('application/vnd.openxmlformats-officedocument.spreadsheetml.template', 'xltx', 'Microsoft Office Excel Template'); +insert into cr_mime_types (mime_type, file_extension, label) values ('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'pptx', 'Microsoft Office PowerPoint Presentation'); +insert into cr_mime_types (mime_type, file_extension, label) values ('application/vnd.openxmlformats-officedocument.presentationml.slideshow', 'ppsx', 'Microsoft Office PowerPoint Slideshow'); +insert into cr_mime_types (mime_type, file_extension, label) values ('application/vnd.openxmlformats-officedocument.presentationml.template', 'potx', 'Microsoft Office PowerPoint Template'); +insert into cr_mime_types (mime_type, file_extension, label) values ('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'docx', 'Microsoft Office Word'); +insert into cr_mime_types (mime_type, file_extension, label) values ('application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'dotx', 'Microsoft Office Word Template'); + -- Extension to mime type maps. -- text/plain for prog langs (maybe we should do application/x-LANG but then you can't look @@ -484,6 +493,16 @@ insert into cr_extension_mime_type_map (mime_type, extension) values ('application/vnd.oasis.opendocument.database', 'odb'); insert into cr_extension_mime_type_map (mime_type, extension) values ('application/vnd.oasis.opendocument.image', 'odi'); +-- Open XML formats for MS-Office +insert into cr_extension_mime_type_map (mime_type, extension) values ('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'xlsx'); +insert into cr_extension_mime_type_map (mime_type, extension) values ('application/vnd.openxmlformats-officedocument.spreadsheetml.template', 'xltx'); +insert into cr_extension_mime_type_map (mime_type, extension) values ('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'pptx'); +insert into cr_extension_mime_type_map (mime_type, extension) values ('application/vnd.openxmlformats-officedocument.presentationml.slideshow', 'ppsx'); +insert into cr_extension_mime_type_map (mime_type, extension) values ('application/vnd.openxmlformats-officedocument.presentationml.template', 'potx'); +insert into cr_extension_mime_type_map (mime_type, extension) values ('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'docx'); +insert into cr_extension_mime_type_map (mime_type, extension) values ('application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'dotx'); + + -- Here are some less common mime types and extensions not defined here. -- -- tsp | application/dsptype Index: openacs-4/packages/acs-content-repository/tcl/apm-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/apm-callback-procs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-content-repository/tcl/apm-callback-procs.tcl 20 Jul 2009 12:24:47 -0000 1.1.2.1 @@ -0,0 +1,42 @@ +# /packages/acs-content-repository/tcl/apm-callback-procs.tcl + +ad_library { + + APM callbacks library + + @creation-date July 2009 + @author Emmanuelle Raffenne (eraffenne@gmail.com) + @cvs-id $Id: apm-callback-procs.tcl,v 1.1.2.1 2009/07/20 12:24:47 emmar Exp $ + +} + +namespace eval content {} +namespace eval content::apm {} + +ad_proc -public content::apm::after_upgrade { + {-from_version_name:required} + {-to_version_name:required} +} { + apm_upgrade_logic \ + -from_version_name $from_version_name \ + -to_version_name $to_version_name \ + -spec { + 5.5.1d1 5.5.1d2 { + set mimetype_list [list \ + {"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" "xlsx" "Microsoft Office Excel"} \ + {"application/vnd.openxmlformats-officedocument.spreadsheetml.template" "xltx" "Microsoft Office Excel Template"} \ + {"application/vnd.openxmlformats-officedocument.presentationml.presentation" "pptx" "Microsoft Office PowerPoint Presentation"} \ + {"application/vnd.openxmlformats-officedocument.presentationml.slideshow" "ppsx" "Microsoft Office PowerPoint Slideshow"} \ + {"application/vnd.openxmlformats-officedocument.presentationml.template" "potx" "Microsoft Office PowerPoint Template"} \ + {"application/vnd.openxmlformats-officedocument.wordprocessingml.document" "docx" "Microsoft Office Word"} \ + {"application/vnd.openxmlformats-officedocument.wordprocessingml.template" "dotx" "Microsoft Office Word Template"}] + + foreach elm $mimetype_list { + cr_create_mime_type \ + -mime_type [lindex $elm 0] \ + -extension [lindex $elm 1] \ + -description [lindex $elm 2] + } + } + } +}