Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 31 → Rev 32

/kickup/trunk/src/ak/kickup/core/action/AdminApartmentAction.java
24,6 → 24,7
import ak.kickup.util.UserException;
import ak.kickup.core.model.Apartment;
import ak.kickup.core.model.ApartmentManager;
import ak.kickup.core.model.EventManager;
 
public final class AdminApartmentAction
extends Action
64,6 → 65,9
Long apartmentId = StringConverter.parseLong(theForm.get("id"));
Apartment apartment = ApartmentManager.getInstance().get(apartmentId);
 
if(!EventManager.getInstance().allowDeleteApartment(apartment))
throw new UserException("ak.kickup.core.apartment.delete.usedbyevent");
 
ApartmentManager.getInstance().delete(apartment);
response.sendRedirect(BackPath.findBackPath(request).getBackwardUrl());
return null;
/kickup/trunk/src/ak/kickup/core/action/AdminActAction.java
24,6 → 24,8
import ak.kickup.util.UserException;
import ak.kickup.core.model.Act;
import ak.kickup.core.model.ActManager;
import ak.kickup.core.model.EventManager;
import ak.kickup.core.model.ParticipantManager;
 
public final class AdminActAction
extends Action
61,6 → 63,12
Long actId = StringConverter.parseLong(theForm.get("id"));
Act act = ActManager.getInstance().get(actId);
 
if(!EventManager.getInstance().allowDeleteAct(act))
throw new UserException("ak.kickup.core.act.delete.usedbyevent");
 
if(!ParticipantManager.getInstance().allowDeleteAct(act))
throw new UserException("ak.kickup.core.act.delete.usedbyparticipant");
 
ActManager.getInstance().delete(act);
response.sendRedirect(BackPath.findBackPath(request).getBackwardUrl());
return null;