From e7bca045d1de2a96b524a811740608e8093b3d4f Mon Sep 17 00:00:00 2001 From: hns Date: Wed, 11 Jan 2006 09:40:26 +0000 Subject: [PATCH] * Use res.skinpath to find hrefSkin when post-processing hrefs. Fixes bug 450. --- src/helma/scripting/rhino/RhinoCore.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/helma/scripting/rhino/RhinoCore.java b/src/helma/scripting/rhino/RhinoCore.java index 3d83acbd..72b62153 100644 --- a/src/helma/scripting/rhino/RhinoCore.java +++ b/src/helma/scripting/rhino/RhinoCore.java @@ -706,12 +706,15 @@ public final class RhinoCore implements ScopeProvider { // first, look in the object href was called on. Skin skin = null; Object handler = obj; + // get the currently active rhino engine and render the skin + Context cx = Context.getCurrentContext(); + RhinoEngine engine = (RhinoEngine) cx.getThreadLocal("engine"); while (handler != null) { Prototype proto = app.getPrototype(handler); if (proto != null) { - skin = proto.getSkin(hrefSkin); + skin = engine.getSkin(proto.getName(), hrefSkin); } if (skin != null) { @@ -722,10 +725,6 @@ public final class RhinoCore implements ScopeProvider { } if (skin != null) { - // get the currently active rhino engine and render the skin - Context cx = Context.getCurrentContext(); - RhinoEngine engine = (RhinoEngine) cx.getThreadLocal("engine"); - engine.getResponse().pushStringBuffer(); HashMap param = new HashMap(); param.put("path", basicHref);