Fixed issue with missing folder owner

This commit is contained in:
Ziver Koc 2017-08-07 20:52:16 +02:00
parent 76206ffa08
commit dc2ef4cd8a
2 changed files with 31 additions and 45 deletions

View file

@ -32,7 +32,7 @@ import zutil.log.LogUtil;
public class Zallery extends HttpServlet{
private static Logger logger = LogUtil.getLogger();
public static final String VERSION = "1.0.1";
public static final String VERSION = "1.0.2";
public static String WEBSITE_NAME = "Example.com";
public static String WEBSITE_URL = "http://example.com";
@ -54,7 +54,7 @@ public class Zallery extends HttpServlet{
Context context = new InitialContext();
// Check if Zallery has been properly configured
if ("C:\\\\data".equals(context.lookup("java:comp/env/DATA_PATH")))
throw new ServletException("Zallery has not been properly configured, set proper configuration in Zaller.xml context file.");
throw new ServletException("Zallery has not been properly configured, set proper configuration in Zallery.xml context file.");
WEBSITE_NAME = (String)context.lookup("java:comp/env/WEBSITE_NAME");
WEBSITE_URL = (String)context.lookup("java:comp/env/WEBSITE_URL");
@ -211,7 +211,7 @@ public class Zallery extends HttpServlet{
}
}
List<Media> list = Media.load(db, folder);
List<Folder> subFolders = Folder.loadSubFolders(db, folder.getId(), user);
List<Folder> subFolders = Folder.loadSubFolders(db, folder, user);
//session.setAttribute("user", user);
request.setAttribute("folder", folder);