On Mon, Mar 1, 2010 at 16:09, Vincent Massol <vincent(a)massol.net> wrote:
On Mar 1, 2010, at 3:48 PM, tmortagne (SVN) wrote:
Author: tmortagne
Date: 2010-03-01 15:48:24 +0100 (Mon, 01 Mar 2010)
New Revision: 27385
Modified:
platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/XWiki.java
platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/web/Utils.java
Log:
XWIKI-4955: Page with empty content leads to "This template does not exist"
message when viewed in plain mode
Modified: platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/XWiki.java
===================================================================
--- platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/XWiki.java 2010-03-01
10:06:17 UTC (rev 27384)
+++ platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/XWiki.java 2010-03-01
14:48:24 UTC (rev 27385)
@@ -90,7 +90,6 @@
import org.xwiki.cache.config.CacheConfiguration;
import org.xwiki.cache.eviction.LRUEvictionConfiguration;
import org.xwiki.component.manager.ComponentLookupException;
-import org.xwiki.model.reference.AttachmentReference;
import org.xwiki.model.reference.DocumentReference;
import org.xwiki.model.reference.DocumentReferenceResolver;
import org.xwiki.model.reference.EntityReferenceSerializer;
@@ -1721,9 +1720,28 @@
return parsedContent;
}
+ /**
+ * @deprecated use {@link #evaluateTemplate(String, XWikiContext)} instead
+ */
+ @Deprecated
public String parseTemplate(String template, XWikiContext context)
{
+ String result = "";
+
try {
+ result = evaluateTemplate(template, context);
+ } catch (Exception e) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Exception while parsing template [" + template +
"] from /templates/", e);
+ }
+ }
+
+ return result;
+ }
+
+ public String evaluateTemplate(String template, XWikiContext context) throws
IOException
Missing @since javadoc tag?
Indeed. Fixing that.
Thanks
-Vincent
[snip]
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs