From f9e5f9596fb8a451c225364d08b8290e5b7ac3e4 Mon Sep 17 00:00:00 2001 From: jensp Date: Fri, 25 Oct 2013 17:28:37 +0000 Subject: [PATCH] ccm-cms-types-xmlfeed: Upgrade script (6.6.0 to 6.6.1) for settings correct keys for labels and description of the authoring step. git-svn-id: https://svn.libreccm.org/ccm/trunk@2385 8810af33-2d31-482b-a856-94f89814c4df --- ccm-cms-types-xmlfeed/application.xml | 2 +- .../6.6.0-6.6.1/fix_authoring_step_labels.sql | 59 ++++++++++++++++ .../upgrade/orcale-se-6.6.0-6.6.1.sql | 1 + .../upgrade/postgres-6.6.0-6.6.1.sql | 3 + .../arsdigita/cms/contenttypes/XMLFeed.xml | 68 +++++++++---------- .../src/ccm-cms-types-xmlfeed.upgrade | 6 ++ 6 files changed, 104 insertions(+), 35 deletions(-) create mode 100644 ccm-cms-types-xmlfeed/sql/ccm-cms-types-xmlfeed/default/upgrade/6.6.0-6.6.1/fix_authoring_step_labels.sql create mode 100644 ccm-cms-types-xmlfeed/sql/ccm-cms-types-xmlfeed/upgrade/orcale-se-6.6.0-6.6.1.sql create mode 100644 ccm-cms-types-xmlfeed/sql/ccm-cms-types-xmlfeed/upgrade/postgres-6.6.0-6.6.1.sql create mode 100644 ccm-cms-types-xmlfeed/src/ccm-cms-types-xmlfeed.upgrade diff --git a/ccm-cms-types-xmlfeed/application.xml b/ccm-cms-types-xmlfeed/application.xml index 4b1c1bdc1..e8419ec80 100755 --- a/ccm-cms-types-xmlfeed/application.xml +++ b/ccm-cms-types-xmlfeed/application.xml @@ -2,7 +2,7 @@ diff --git a/ccm-cms-types-xmlfeed/sql/ccm-cms-types-xmlfeed/default/upgrade/6.6.0-6.6.1/fix_authoring_step_labels.sql b/ccm-cms-types-xmlfeed/sql/ccm-cms-types-xmlfeed/default/upgrade/6.6.0-6.6.1/fix_authoring_step_labels.sql new file mode 100644 index 000000000..217f09667 --- /dev/null +++ b/ccm-cms-types-xmlfeed/sql/ccm-cms-types-xmlfeed/default/upgrade/6.6.0-6.6.1/fix_authoring_step_labels.sql @@ -0,0 +1,59 @@ +-- +-- Copyright (C) 2013 Jens Pelzetter. All Rights Reserved. +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public License +-- as published by the Free Software Foundation; either version 2.1 of +-- the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- Fixes the labels for authoring steps (and the moment the key in the +-- database is the english text, this upgrade replaces this with the +-- key and sets the bundle for the authoring steps. + +UPDATE authoring_steps + SET label_key = 'cms.contenttypes.shared.basic_properties.title', + label_bundle = 'com.arsdigita.cms.CMSResources', + description_key = 'cms.contenttypes.shared.basic_properties.description', + description_bundle = 'com.arsdigita.cms.CMSResources' + WHERE step_id = (SELECT authoring_steps.step_id + FROM authoring_steps + JOIN authoring_kit_step_map ON authoring_steps.step_id = authoring_kit_step_map.step_id + JOIN authoring_kits ON authoring_kit_step_map.kit_id = authoring_kits.kit_id + JOIN content_types ON authoring_kits.type_id = content_types.type_id + WHERE authoring_steps.component = 'com.arsdigita.cms.contenttypes.xmlfeed.ui.XMLFeedProperties' + AND content_types.object_type = 'com.arsdigita.cms.contenttypes.xmlfeed.XMLFeed'); + +UPDATE authoring_steps + SET label_key = 'xmlfeed.authoring.styling_step.title', + label_bundle = 'com.arsdigita.cms.contenttypes.xmlfeed.XMLFeedResources', + description_key = 'xmlfeed.authoring.styling_step.description', + description_bundle = 'com.arsdigita.cms.contenttypes.xmlfeed.XMLFeedResources' + WHERE step_id = (SELECT authoring_steps.step_id + FROM authoring_steps + JOIN authoring_kit_step_map ON authoring_steps.step_id = authoring_kit_step_map.step_id + JOIN authoring_kits ON authoring_kit_step_map.kit_id = authoring_kits.kit_id + JOIN content_types ON authoring_kits.type_id = content_types.type_id + WHERE authoring_steps.component = 'com.arsdigita.cms.contenttypes.xmlfeed.ui.XSLFileProperties' + AND content_types.object_type = 'com.arsdigita.cms.contenttypes.xmlfeed.XMLFeed'); + +UPDATE authoring_steps + SET label_key = 'xmlfeed.authoring.query_form_step.title', + label_bundle = 'com.arsdigita.cms.contenttypes.xmlfeed.XMLFeedResources', + description_key = 'xmlfeed.authoring.query_form.description', + description_bundle = 'com.arsdigita.cms.contenttypes.xmlfeed.XMLFeedResources' + WHERE step_id = (SELECT authoring_steps.step_id + FROM authoring_steps + JOIN authoring_kit_step_map ON authoring_steps.step_id = authoring_kit_step_map.step_id + JOIN authoring_kits ON authoring_kit_step_map.kit_id = authoring_kits.kit_id + JOIN content_types ON authoring_kits.type_id = content_types.type_id + WHERE authoring_steps.component = 'com.arsdigita.cms.ui.formbuilder.FormControls' + AND content_types.object_type = 'com.arsdigita.cms.contenttypes.xmlfeed.XMLFeed'); diff --git a/ccm-cms-types-xmlfeed/sql/ccm-cms-types-xmlfeed/upgrade/orcale-se-6.6.0-6.6.1.sql b/ccm-cms-types-xmlfeed/sql/ccm-cms-types-xmlfeed/upgrade/orcale-se-6.6.0-6.6.1.sql new file mode 100644 index 000000000..88a70f091 --- /dev/null +++ b/ccm-cms-types-xmlfeed/sql/ccm-cms-types-xmlfeed/upgrade/orcale-se-6.6.0-6.6.1.sql @@ -0,0 +1 @@ +@@ ../default/upgrade/6.6.0-6.6.1/fix_authoring_step_labels.sql \ No newline at end of file diff --git a/ccm-cms-types-xmlfeed/sql/ccm-cms-types-xmlfeed/upgrade/postgres-6.6.0-6.6.1.sql b/ccm-cms-types-xmlfeed/sql/ccm-cms-types-xmlfeed/upgrade/postgres-6.6.0-6.6.1.sql new file mode 100644 index 000000000..324c8f2fe --- /dev/null +++ b/ccm-cms-types-xmlfeed/sql/ccm-cms-types-xmlfeed/upgrade/postgres-6.6.0-6.6.1.sql @@ -0,0 +1,3 @@ +begin; + \i ../default/upgrade/6.6.0-6.6.1/fix_authoring_step_labels.sql +commit; diff --git a/ccm-cms-types-xmlfeed/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/XMLFeed.xml b/ccm-cms-types-xmlfeed/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/XMLFeed.xml index 24195bd44..0bfa63d95 100755 --- a/ccm-cms-types-xmlfeed/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/XMLFeed.xml +++ b/ccm-cms-types-xmlfeed/src/WEB-INF/content-types/com/arsdigita/cms/contenttypes/XMLFeed.xml @@ -1,45 +1,45 @@ + xsi:schemaLocation="http://xmlns.redhat.com/cms/content-types content-types.xsd"> - + - + - + - - + + - - + + - - + + - + diff --git a/ccm-cms-types-xmlfeed/src/ccm-cms-types-xmlfeed.upgrade b/ccm-cms-types-xmlfeed/src/ccm-cms-types-xmlfeed.upgrade new file mode 100644 index 000000000..187bbd3c7 --- /dev/null +++ b/ccm-cms-types-xmlfeed/src/ccm-cms-types-xmlfeed.upgrade @@ -0,0 +1,6 @@ + + + +