You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2006/07/27 14:59:45 UTC
svn commit: r426054 -
/lenya/trunk/src/java/org/apache/lenya/cms/cocoon/components/modules/input/ResourceTypeModule.java
Author: andreas
Date: Thu Jul 27 05:59:44 2006
New Revision: 426054
URL: http://svn.apache.org/viewvc?rev=426054&view=rev
Log:
Don't resolve document if not necessary to get resource type
Modified:
lenya/trunk/src/java/org/apache/lenya/cms/cocoon/components/modules/input/ResourceTypeModule.java
Modified: lenya/trunk/src/java/org/apache/lenya/cms/cocoon/components/modules/input/ResourceTypeModule.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/cocoon/components/modules/input/ResourceTypeModule.java?rev=426054&r1=426053&r2=426054&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/cocoon/components/modules/input/ResourceTypeModule.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/cocoon/components/modules/input/ResourceTypeModule.java Thu Jul 27 05:59:44 2006
@@ -66,13 +66,13 @@
Publication pub = null;
String attribute;
- DocumentFactory docFactory = DocumentUtil.createDocumentIdentityMap(this.manager, session);
- String webappUrl = ServletHelper.getWebappURI(request);
- Document document = docFactory.getFromURL(webappUrl);
- pub = document.getPublication();
-
String[] steps = name.split(":");
if (steps.length == 1) {
+ DocumentFactory docFactory = DocumentUtil.createDocumentIdentityMap(this.manager, session);
+ String webappUrl = ServletHelper.getWebappURI(request);
+ Document document = docFactory.getFromURL(webappUrl);
+ pub = document.getPublication();
+
attribute = name;
resourceType = document.getResourceType();
} else {
@@ -126,7 +126,7 @@
* @param pubid publication id of the current document
* @param prefix prefix which will be prepended to the resulting URL
* @param uri fallback uri, must start with fallback://
- * @return
+ * @return A string.
* @throws ConfigurationException
*/
protected String transformFallbackUriToHttp(String pubid, String prefix, String uri) throws ConfigurationException {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org