diff --git a/config/alfresco/templates/readme.ftl b/config/alfresco/templates/readme.ftl index f2c5ae1fe0..2a43306eaa 100644 --- a/config/alfresco/templates/readme.ftl +++ b/config/alfresco/templates/readme.ftl @@ -1,32 +1,22 @@ <#-- Displays the contents of readme.html and/or the evaluated readme.ftl if they exist in the current space. --> -<#-- Old template -<#assign htmlFilename = "readme.html"/> -<#assign ftlFilename = "readme.ftl"/> - -<#if space?exists> - <#if space.childByNamePath["${htmlFilename}"]?exists> - ${space.childByNamePath[htmlFilename].content} - - <#if space.childByNamePath["${ftlFilename}"]?exists> - <#include space.childByNamePath["${ftlFilename}"].nodeRef> - - ---> <#assign filename = "readme"/> <#assign htmlExt = "html"/> <#assign suffix = .lang /> <#assign ftlExt = "ftl"/> -<#assign htmlFilename = "${filename}_${suffix}.${htmlExt}"/> +<#assign htmlLangFilename = "${filename}_${suffix}.${htmlExt}"/> +<#assign htmlFilename = "${filename}.${htmlExt}"/> <#assign ftlFilename = "${filename}.${ftlExt}"/> -<#assign messageError="File ${htmlFilename} does not exist!"/> +<#assign messageError="Readme file does not exist!"/> +<#assign found = false> <#if space?exists> - <#if space.childByNamePath["${htmlFilename}"]?exists> + <#if space.childByNamePath["${htmlLangFilename}"]?exists> + ${space.childByNamePath[htmlLangFilename].content} + <#elseif space.childByNamePath["${htmlFilename}"]?exists> ${space.childByNamePath[htmlFilename].content} - <#else> + <#elseif space.childByNamePath["${ftlFilename}"]?exists> + <#include space.childByNamePath["${ftlFilename}"].nodeRef> + <#else> ${messageError} - <#if space.childByNamePath["${ftlFilename}"]?exists> - <#include space.childByNamePath["${ftlFilename}"].nodeRef> - - + \ No newline at end of file diff --git a/source/java/org/alfresco/repo/action/evaluator/compare/TextPropertyValueComparator.java b/source/java/org/alfresco/repo/action/evaluator/compare/TextPropertyValueComparator.java index cf902e5a98..15ea2ed978 100644 --- a/source/java/org/alfresco/repo/action/evaluator/compare/TextPropertyValueComparator.java +++ b/source/java/org/alfresco/repo/action/evaluator/compare/TextPropertyValueComparator.java @@ -73,7 +73,7 @@ public class TextPropertyValueComparator implements PropertyValueComparator { // Remove the star and set the operation to startsWith operation = ComparePropertyValueOperation.BEGINS; - compareText = compareText.substring(0, (compareText.length()-2)); + compareText = compareText.substring(0, (compareText.length()-1)); } else {