From d4e0c770e3a79e5f36ce974f3ed4dd4834639f4f Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Tue, 12 May 2015 07:23:54 -0700 Subject: Fixing undefined reference to config on error page. --- src/com/p4square/fmfacade/FreeMarkerPageResource.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/com/p4square/fmfacade') diff --git a/src/com/p4square/fmfacade/FreeMarkerPageResource.java b/src/com/p4square/fmfacade/FreeMarkerPageResource.java index c6cf81e..8c8948a 100644 --- a/src/com/p4square/fmfacade/FreeMarkerPageResource.java +++ b/src/com/p4square/fmfacade/FreeMarkerPageResource.java @@ -31,10 +31,11 @@ import com.p4square.session.Sessions; public class FreeMarkerPageResource extends ServerResource { private static Logger cLog = Logger.getLogger(FreeMarkerPageResource.class); - public static Map baseRootObject(Context context) { + public static Map baseRootObject(final Context context, final FMFacade fmf) { Map root = new HashMap(); root.put("get", new GetMethod(context.getClientDispatcher())); + root.put("config", fmf.getConfig()); return root; } @@ -72,12 +73,11 @@ public class FreeMarkerPageResource extends ServerResource { * @return A map of objects and methods for the template to access. */ protected Map getRootObject() { - Map root = baseRootObject(getContext()); + Map root = baseRootObject(getContext(), mFMF); root.put("attributes", getRequestAttributes()); root.put("query", getQuery().getValuesMap()); - root.put("config", mFMF.getConfig()); - + if (getClientInfo().isAuthenticated()) { final User user = getClientInfo().getUser(); final Map userMap = new HashMap(); -- cgit v1.2.3