Author: chris.laprun(a)jboss.com
Date: 2009-06-17 11:04:30 -0400 (Wed, 17 Jun 2009)
New Revision: 13467
Modified:
branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_fr.properties
Log:
- JBPORTAL-2417: hopefully fixed the incorrect saving of invalid data.
Modified:
branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java 2009-06-17
02:39:53 UTC (rev 13466)
+++
branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java 2009-06-17
15:04:30 UTC (rev 13467)
@@ -920,7 +920,7 @@
String sFolderName = aReq.getParameter("newcollectionname");
String sFolderDescription =
aReq.getParameter("newcollectiondescription");
sFolderDescription =
ParameterValidation.sanitizeFromPattern(sFolderDescription, CHECK_FOR_XSS_PATTERN,
"");
-
+
if (!"".equals(sCreatePath) &&
!"".equals(sFolderName) && !"".equals(sFolderDescription))
{
String sNewPath = FileUtil.cleanDoubleSlashes(sCreatePath + SLASH +
sFolderName);
@@ -1518,21 +1518,17 @@
sLanguage = ParameterValidation.sanitizeFromPattern(sLanguage,
CHECK_FOR_XSS_PATTERN, INVALID_LANG);
boolean invalidLang = INVALID_LANG.equals(sLanguage);
- if (invalidLang)
-
+ if (invalidTitle || invalidDesc || invalidLang)
{
- if (invalidTitle || invalidDesc || invalidLang)
- {
- aRes.setRenderParameter("op", CMSAdminConstants.OP_EDIT);
+ aRes.setRenderParameter("op", CMSAdminConstants.OP_EDIT);
- // output error message
- aRes.setRenderParameter(ERROR_MESSAGE,
CMSAdminConstants.CMS_INVALID_PARAMETER);
+ // output error message
+ aRes.setRenderParameter(ERROR_MESSAGE,
CMSAdminConstants.CMS_INVALID_PARAMETER);
- aRes.setRenderParameter("path",
aReq.getParameter("savetopath"));
- aRes.setRenderParameter("language",
aReq.getParameter("language"));
+ aRes.setRenderParameter("path",
aReq.getParameter("savetopath"));
+ aRes.setRenderParameter("language",
aReq.getParameter("language"));
- return;
- }
+ return;
}
Locale locale = new Locale(sLanguage);
Modified:
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties 2009-06-17
02:39:53 UTC (rev 13466)
+++
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties 2009-06-17
15:04:30 UTC (rev 13467)
@@ -1,6 +1,6 @@
################################################################################
# JBoss, a division of Red Hat #
-# Copyright 2006, Red Hat Middleware, LLC, and individual #
+# Copyright 2009, Red Hat Middleware, LLC, and individual #
# contributors as indicated by the @authors tag. See the #
# copyright.txt in the distribution for a full listing of #
# individual contributors. #
@@ -143,7 +143,7 @@
CMS_FILENAME_INVALID=File Name is invalid. It may not contain illegal characters such as
'.', '/', ':', '[', ']', '*',
''', '"', '|' or any whitespace character.
CMS_FOLDERNAME_INVALID=Folder Name is invalid. It may not contain illegal characters such
as '.', '/', ':', '[', ']', '*',
''', '"', '|' or any whitespace character.
-CMS_INVALID_PARAMETER=A value below is invalid. It may not contain illegal characters
such as '\\', '<', '>', '(', ')',
'=' or '%5c'.
+CMS_INVALID_PARAMETER=A value below was invalid. It may not contain illegal characters
such as '\\', '<', '>', '(', ')',
'=' or '%5c'.
CMS_MSG_DESTINATION_ALREADY_EXISTS=The command was not performed, because the destination
already exists.
CMS_CANT_MOVE_SAME_DESTINATION=You cannot move a folder to the same location
Modified:
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_fr.properties
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_fr.properties 2009-06-17
02:39:53 UTC (rev 13466)
+++
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource_fr.properties 2009-06-17
15:04:30 UTC (rev 13467)
@@ -1,7 +1,6 @@
-#Generated by ResourceBundle Editor (
http://eclipse-rbe.sourceforge.net)
################################################################################
# JBoss, a division of Red Hat #
-# Copyright 2006, Red Hat Middleware, LLC, and individual #
+# Copyright 2009, Red Hat Middleware, LLC, and individual #
# contributors as indicated by the @authors tag. See the #
# copyright.txt in the distribution for a full listing of #
# individual contributors. #
@@ -160,4 +159,4 @@
CMS_MISSING_DOCUMENT=404 - Page non trouv\u00e9e
CMS_MISSING_DOCUMENT_DESCRIPTION=Le document auquel vous avez tent\u00e9
d'acc\u00e9der est introuvable
-CMS_INVALID_PARAMETER=Une valeur ci-dessous est invalide car elle contient des
caract\u00e8rs invalides '\\', '<', '>', '(',
')', '=' ou '%5c'.
\ No newline at end of file
+CMS_INVALID_PARAMETER=Une valeur ci-dessous \u00e9tait invalide car elle contenait des
caract\u00e8rs invalides '\\', '<', '>', '(',
')', '=' ou '%5c'.
\ No newline at end of file