From: <fg...@us...> - 2010-02-18 15:23:35
|
Revision: 1991 http://openutils.svn.sourceforge.net/openutils/?rev=1991&view=rev Author: fgiust Date: 2010-02-18 15:23:28 +0000 (Thu, 18 Feb 2010) Log Message: ----------- public constructor to make freemarker happy Modified Paths: -------------- trunk/openutils-mgnlutils/src/main/java/it/openutils/mgnlutils/el/MgnlUtilsElFunctions.java Modified: trunk/openutils-mgnlutils/src/main/java/it/openutils/mgnlutils/el/MgnlUtilsElFunctions.java =================================================================== --- trunk/openutils-mgnlutils/src/main/java/it/openutils/mgnlutils/el/MgnlUtilsElFunctions.java 2010-02-18 15:11:20 UTC (rev 1990) +++ trunk/openutils-mgnlutils/src/main/java/it/openutils/mgnlutils/el/MgnlUtilsElFunctions.java 2010-02-18 15:23:28 UTC (rev 1991) @@ -58,9 +58,9 @@ */ private static Logger log = LoggerFactory.getLogger(MgnlUtilsElFunctions.class); - private MgnlUtilsElFunctions() + public MgnlUtilsElFunctions() { - // don't instantiate + // allow instantion for freemarker } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2010-02-23 10:10:41
|
Revision: 2041 http://openutils.svn.sourceforge.net/openutils/?rev=2041&view=rev Author: cstrap Date: 2010-02-23 10:10:32 +0000 (Tue, 23 Feb 2010) Log Message: ----------- Fix broken links if already have an extension Modified Paths: -------------- trunk/openutils-mgnlutils/src/main/java/it/openutils/mgnlutils/el/MgnlUtilsElFunctions.java Modified: trunk/openutils-mgnlutils/src/main/java/it/openutils/mgnlutils/el/MgnlUtilsElFunctions.java =================================================================== --- trunk/openutils-mgnlutils/src/main/java/it/openutils/mgnlutils/el/MgnlUtilsElFunctions.java 2010-02-22 22:42:59 UTC (rev 2040) +++ trunk/openutils-mgnlutils/src/main/java/it/openutils/mgnlutils/el/MgnlUtilsElFunctions.java 2010-02-23 10:10:32 UTC (rev 2041) @@ -178,7 +178,7 @@ if (cleanedurl.startsWith("/")) { cleanedurl = contextPath + cleanedurl; - if (!cleanedurl.endsWith(".html")) + if (!cleanedurl.endsWith(".html") && cleanedurl.indexOf(".") < 0) { return cleanedurl + ".html"; } @@ -527,4 +527,3 @@ } } - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2010-05-12 15:12:53
|
Revision: 2416 http://openutils.svn.sourceforge.net/openutils/?rev=2416&view=rev Author: fgiust Date: 2010-05-12 15:12:47 +0000 (Wed, 12 May 2010) Log Message: ----------- magnolia 4.0 source compatibility ( mvn clean install -Dmagnolia.version=4.0 ) Modified Paths: -------------- trunk/openutils-mgnlutils/src/main/java/it/openutils/mgnlutils/el/MgnlUtilsElFunctions.java Modified: trunk/openutils-mgnlutils/src/main/java/it/openutils/mgnlutils/el/MgnlUtilsElFunctions.java =================================================================== --- trunk/openutils-mgnlutils/src/main/java/it/openutils/mgnlutils/el/MgnlUtilsElFunctions.java 2010-05-12 15:07:37 UTC (rev 2415) +++ trunk/openutils-mgnlutils/src/main/java/it/openutils/mgnlutils/el/MgnlUtilsElFunctions.java 2010-05-12 15:12:47 UTC (rev 2416) @@ -639,7 +639,8 @@ */ public static Boolean hasChildWithTitle(Content content, String title) { - for (Content currentChild : content.getChildren()) + Collection<Content> children = content.getChildren(); + for (Content currentChild : children) { if (currentChild.getTitle() != null && currentChild.getTitle().equalsIgnoreCase(title)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2011-01-23 19:40:48
|
Revision: 3271 http://openutils.svn.sourceforge.net/openutils/?rev=3271&view=rev Author: fgiust Date: 2011-01-23 19:40:42 +0000 (Sun, 23 Jan 2011) Log Message: ----------- MGNLUTILS-24 handle i18n links Modified Paths: -------------- trunk/openutils-mgnlutils/src/main/java/it/openutils/mgnlutils/el/MgnlUtilsElFunctions.java Modified: trunk/openutils-mgnlutils/src/main/java/it/openutils/mgnlutils/el/MgnlUtilsElFunctions.java =================================================================== --- trunk/openutils-mgnlutils/src/main/java/it/openutils/mgnlutils/el/MgnlUtilsElFunctions.java 2011-01-23 19:38:13 UTC (rev 3270) +++ trunk/openutils-mgnlutils/src/main/java/it/openutils/mgnlutils/el/MgnlUtilsElFunctions.java 2011-01-23 19:40:42 UTC (rev 3271) @@ -593,7 +593,18 @@ */ public static String activePageFullUrl() { - return baseUrl() + MgnlContext.getAggregationState().getMainContent() + ".html"; + try + { + return baseUrl() + + LinkUtil.convertUUIDtoURI(MgnlContext.getAggregationState().getMainContent().getUUID(), MgnlContext + .getAggregationState() + .getRepository()); + } + catch (LinkException e) + { + log.warn("Error generating link", e); + } + return null; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2011-02-09 08:02:11
|
Revision: 3326 http://openutils.svn.sourceforge.net/openutils/?rev=3326&view=rev Author: diego_schivo Date: 2011-02-09 08:02:05 +0000 (Wed, 09 Feb 2011) Log Message: ----------- MGNLUTILS-25 EL function returning a content given a UUID/path/content Modified Paths: -------------- trunk/openutils-mgnlutils/src/main/java/it/openutils/mgnlutils/el/MgnlUtilsElFunctions.java Modified: trunk/openutils-mgnlutils/src/main/java/it/openutils/mgnlutils/el/MgnlUtilsElFunctions.java =================================================================== --- trunk/openutils-mgnlutils/src/main/java/it/openutils/mgnlutils/el/MgnlUtilsElFunctions.java 2011-02-09 07:55:26 UTC (rev 3325) +++ trunk/openutils-mgnlutils/src/main/java/it/openutils/mgnlutils/el/MgnlUtilsElFunctions.java 2011-02-09 08:02:05 UTC (rev 3326) @@ -787,9 +787,9 @@ if (obj instanceof String) { - String mediaIdentifier = (String) obj; + String identifier = (String) obj; - if (StringUtils.isBlank(mediaIdentifier)) + if (StringUtils.isBlank(identifier)) { return null; } @@ -797,25 +797,25 @@ HierarchyManager hm = MgnlContext.getHierarchyManager(repo); try { - if (mediaIdentifier.startsWith("/")) + if (identifier.startsWith("/")) { - if (hm.isExist(mediaIdentifier)) + if (hm.isExist(identifier)) { - content = hm.getContent(mediaIdentifier); + content = hm.getContent(identifier); } } else { - content = hm.getContentByUUID(StringUtils.trim(mediaIdentifier)); + content = hm.getContentByUUID(StringUtils.trim(identifier)); } } catch (ItemNotFoundException e) { - log.debug("Node \"" + mediaIdentifier + "\" not found"); + log.debug("Node \"" + identifier + "\" not found"); } catch (RepositoryException e) { - log.error(e.getClass().getName() + " getting node \"" + mediaIdentifier + "\"", e); + log.error(e.getClass().getName() + " getting node \"" + identifier + "\"", e); } } else if (obj instanceof Content) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |