diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/filters/VitroRequestPrep.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/filters/VitroRequestPrep.java
index 3066dacc6..f5767dcd3 100644
--- a/webapp/src/edu/cornell/mannlib/vitro/webapp/filters/VitroRequestPrep.java
+++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/filters/VitroRequestPrep.java
@@ -140,7 +140,7 @@ public class VitroRequestPrep implements Filter {
return;
}
vreq.setPortal(portal);
- portalFlag = new PortalFlag((HttpServletRequest)request,_appbean, portal);
+ portalFlag = new PortalFlag((HttpServletRequest)request,_appbean, portal, wdf);
vreq.setPortalFlag(portalFlag);
}
}catch(FlagException ex){
diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/flags/PortalFlag.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/flags/PortalFlag.java
index 1ec31b186..48f6aae88 100644
--- a/webapp/src/edu/cornell/mannlib/vitro/webapp/flags/PortalFlag.java
+++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/flags/PortalFlag.java
@@ -9,6 +9,7 @@ import org.apache.commons.logging.LogFactory;
import edu.cornell.mannlib.vitro.webapp.beans.ApplicationBean;
import edu.cornell.mannlib.vitro.webapp.beans.Portal;
+import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory;
import edu.cornell.mannlib.vitro.webapp.utils.FlagMathUtils;
import edu.cornell.mannlib.vitro.webapp.flags.RequestToPortalFlag;
@@ -118,10 +119,11 @@ public class PortalFlag {
* Use this to make a new PortalFlag from the http request and the ServletContext.
*
* @param req
+ * @param wdf TODO
*/
- public PortalFlag(HttpServletRequest req,ApplicationBean appBean, Portal portalBean)
+ public PortalFlag(HttpServletRequest req,ApplicationBean appBean, Portal portalBean, WebappDaoFactory wdf)
throws FlagException {
- RequestToPortalFlag.preparePortalStateForFiltering(this, req,appBean,portalBean);
+ RequestToPortalFlag.preparePortalStateForFiltering(this, req,appBean,portalBean,wdf);
}
/******************* methods *************************/
diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/flags/RequestToPortalFlag.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/flags/RequestToPortalFlag.java
index afce950da..79118c9a9 100644
--- a/webapp/src/edu/cornell/mannlib/vitro/webapp/flags/RequestToPortalFlag.java
+++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/flags/RequestToPortalFlag.java
@@ -2,21 +2,20 @@
package edu.cornell.mannlib.vitro.webapp.flags;
-import edu.cornell.mannlib.vedit.beans.LoginFormBean;
-import edu.cornell.mannlib.vitro.webapp.flags.PortalFlag;
-import edu.cornell.mannlib.vitro.webapp.flags.FlagException;
-import edu.cornell.mannlib.vitro.webapp.flags.AuthFlag;
-import edu.cornell.mannlib.vitro.webapp.beans.ApplicationBean;
-import edu.cornell.mannlib.vitro.webapp.beans.Portal;
-import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
-import edu.cornell.mannlib.vitro.webapp.utils.FlagMathUtils;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
-import java.util.List;
-import java.util.Arrays;
-import java.util.Set;
-import java.util.HashSet;
+
+import edu.cornell.mannlib.vedit.beans.LoginFormBean;
+import edu.cornell.mannlib.vitro.webapp.beans.ApplicationBean;
+import edu.cornell.mannlib.vitro.webapp.beans.Portal;
+import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
+import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory;
+import edu.cornell.mannlib.vitro.webapp.utils.FlagMathUtils;
/**
* Created by IntelliJ IDEA.
@@ -145,7 +144,7 @@ public class RequestToPortalFlag {
*/
public static void preparePortalStateForFiltering(PortalFlag portalFlag, HttpServletRequest req,
- ApplicationBean appBean, Portal portalBean) throws FlagException {
+ ApplicationBean appBean, Portal portalBean, WebappDaoFactory wdf) throws FlagException {
VitroRequest request = new VitroRequest(req);
@@ -163,7 +162,8 @@ public class RequestToPortalFlag {
portalFlag.flag3Active=appBean.isFlag3Active() ;
if( !portalBean.isFlag1Filtering()
- || "nofiltering".equals(req.getParameter("flag1")) ) {
+ || "nofiltering".equals(req.getParameter("flag1"))
+ || wdf.getApplicationDao().isFlag1Active() ) {
portalFlag.flag1Active=false;
portalFlag.flag2Active=false;
portalFlag.flag3Active=false;
diff --git a/webapp/web/templates/browse/browseGroup.jsp b/webapp/web/templates/browse/browseGroup.jsp
index a248c642b..cd3c24c29 100644
--- a/webapp/web/templates/browse/browseGroup.jsp
+++ b/webapp/web/templates/browse/browseGroup.jsp
@@ -6,7 +6,8 @@
<%@ page import="java.util.Iterator" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %><%/* this odd thing points to something in web.xml */ %>
<%@ page errorPage="/error.jsp"%>
-