Commit 25802090 by Tuukka Kivilahti

Merge remote-tracking branch 'origin/master' into eticket

2 parents 4d64c6b8 cc731e52
......@@ -617,7 +617,13 @@ public class PlaceBean implements PlaceBeanLocal {
place.setPlaceReserver(null);
gmemfacade.remove(res);
}
// remove also slot from place
if(place.getReserverSlot() != null) {
PlaceSlot slot = placeSlotFacade.reload(place.getReserverSlot());
slot.setPlace(null);
place.setReserverSlot(null);
}
return place;
}
......
......@@ -103,7 +103,8 @@ public class PlaceSlotFacade extends IntegerPkGenericFacade<PlaceSlot> {
cb.or(cb.isNull(billexp),
cb.greaterThan(billexp, Calendar.getInstance())
),
cb.isNull(root.get(PlaceSlot_.place))
cb.isNull(root.get(PlaceSlot_.place)),
cb.isNull(root.get(PlaceSlot_.used))
);
Long count = super.getSingleNullableResult(getEm().createQuery(q));
......
......@@ -310,6 +310,14 @@ public class Place extends GenericEntity implements Comparable<Place> {
return buyable;
}
public PlaceSlot getReserverSlot() {
return reserverSlot;
}
public void setReserverSlot(PlaceSlot reserverSlot) {
this.reserverSlot = reserverSlot;
}
public void setReleaseTime(Calendar releaseTime) {
this.releaseTime = releaseTime;
}
......
......@@ -9,10 +9,6 @@
<f:event type="preRenderView" listener="#{pageOutputView.initIndexView}" />
</f:metadata>
<ui:define name="content">
<h:outputLabel rendered="#{sessionHandler.isInDevelopmentMode()}">
Development-tilassa.
Täällä voit huoletta rikkoa.
</h:outputLabel>
<ui:fragment rendered="#{layoutView.manageContent}">
<h:link value="#{i18n['layout.editContent']}" outcome="/pages/manage">
<f:param name="pagename" value="#{layoutView.pagepath}" />
......
......@@ -47,7 +47,7 @@ public class SessionStore implements Serializable {
public Locale getLocale() {
Locale ret = locale;
if (ret == null)
if (ret == null || ret.toString().equals(""))
{
String retStr = eventbean.getCurrentEvent().getOrganiser().getBundleCountry();
......@@ -60,11 +60,13 @@ public class SessionStore implements Serializable {
}
}
if (ret == null) {
if (ret == null || ret.toString().equals("")) {
ret = DEFAULT_LOCALE;
}
locale = ret;
}
logger.info("Using locale {}",ret);
return ret;
}
......
......@@ -58,7 +58,8 @@ public class PasswordView extends GenericCDIView {
boolean mod = permbean.hasPermission(UserPermission.MODIFY);
if (permbean.isCurrentUser(user) || mod) {
logger.debug("foo {}, {}", mod, user.checkPassword(oldPassword));
if (!mod && !user.checkPassword(oldPassword)) {
if (!user.checkPassword(oldPassword)) {
super.addFaceMessage("userview.oldPasswordError");
} else if (password == null || !password.equals(passwordcheck)) {
super.addFaceMessage("userview.passwordsDontMatch");
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!