Commit b7abfbcc by Tuukka Kivilahti

paikkakartta laskee paremmin jäljelläolevat. default-arvoja.

1 parent 8aeca4f0
......@@ -203,8 +203,8 @@ public class ProductBean implements ProductBeanLocal {
public HashMap<Integer, BigDecimal> getProductLimit(Map<Integer, BigDecimal> prodCounts, EventUser user)
{
Set<Role> userroles = new HashSet<Role>(userbean.findUsersRoles(user));
HashMap<Integer, BigDecimal> ret = new HashMap<Integer, BigDecimal>();
Set<Role> userroles = new HashSet<>(userbean.findUsersRoles(user));
HashMap<Integer, BigDecimal> ret = new HashMap<>();
for (Entry<Integer, BigDecimal> pc : prodCounts.entrySet())
{
Product prod = productFacade.find(pc.getKey());
......
......@@ -232,8 +232,12 @@ public class PlaceFacade extends IntegerPkGenericFacade<Place> {
cq.where(
cb.equal(root.get(Place_.map), map),
cb.isFalse(root.get(Place_.disabled))
);
cb.isFalse(root.get(Place_.disabled)),
// TKwtf lisäsi:
cb.isTrue(root.get(Place_.buyable))
);
return getSingleNullableResult(getEm().createQuery(cq));
......@@ -256,7 +260,10 @@ public class PlaceFacade extends IntegerPkGenericFacade<Place> {
cb.equal(root.get(Place_.map), map),
cb.isNull(root.get(Place_.releaseTime)),
cb.isNull(root.get(Place_.group)),
cb.isFalse(root.get(Place_.disabled))
cb.isFalse(root.get(Place_.disabled)),
// TKwtf lisäsi:
cb.isTrue(root.get(Place_.buyable))
);
return getSingleNullableResult(getEm().createQuery(cq));
......
......@@ -43,7 +43,7 @@ public enum LanEventPropertyKey {
TEMPLATE_PROPERTY4(Type.TEXT, null),
TEMPLATE_PROPERTY5(Type.TEXT, null),
INVITE_ONLY_EVENT(Type.BOOL, null),
USE_ETICKET(Type.BOOL, null),
USE_ETICKET(Type.BOOL, "1"),
ETICKETMAIL_SUBJECT(Type.TEXT, "Your etickets to Moya Online Youth Accumulator"),
ETICKETMAIL_CONTENT(Type.TEXT, "Hello {1},\n\nYou can find your etickets to an event from: {0}"),
MAP_QUEUE(Type.BOOL, null),
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!