Author: sdumitriu
Date: 2008-02-09 03:04:24 +0100 (Sat, 09 Feb 2008)
New Revision: 7460
Modified:
xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/XWiki.java
Log:
XWIKI-2095: Display the parsed velocity template name in the logs
Fixed (part 1)
Modified:
xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/XWiki.java
===================================================================
--- xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/XWiki.java
2008-02-09 00:47:38 UTC (rev 7459)
+++ xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/XWiki.java
2008-02-09 02:04:24 UTC (rev 7460)
@@ -1413,8 +1413,8 @@
try {
String content = getResourceContent("/templates/" + template);
- return XWikiVelocityRenderer.evaluate(content, "",
(VelocityContext) context
- .get("vcontext"), context);
+ return XWikiVelocityRenderer.evaluate(content, "/templates/" +
template,
+ (VelocityContext) context.get("vcontext"), context);
} catch (Exception e) {
return "";
}
@@ -1425,7 +1425,7 @@
try {
String path = "/skins/" + skin + "/" + template;
String content = getResourceContent(path);
- return XWikiVelocityRenderer.evaluate(content, "",
(VelocityContext) context
+ return XWikiVelocityRenderer.evaluate(content, path,
(VelocityContext) context
.get("vcontext"), context);
} catch (Exception e) {
}
@@ -1438,7 +1438,7 @@
String content = object.getStringValue(template);
if ((content != null) && (!content.equals(""))) {
// Let's use this template
- return XWikiVelocityRenderer.evaluate(content, "",
+ return XWikiVelocityRenderer.evaluate(content, skin +
"#" + template,
(VelocityContext) context.get("vcontext"),
context);
}
}
@@ -4619,7 +4619,8 @@
String propname = (String) it.next();
vcontext.put(propname, userobj.getStringValue(propname));
}
- text = XWikiVelocityRenderer.evaluate(format, "", vcontext,
context);
+ text = XWikiVelocityRenderer.evaluate(format, "<username
formatting code in " +
+ context.getDoc().getFullName() + ">", vcontext, context);
}
if (link == false)
_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications