Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 32 → Rev 30

/kickup/trunk/src/ak/kickup/core/action/AdminApartmentAction.java
24,7 → 24,6
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
65,9 → 64,6
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,8 → 24,6
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
63,12 → 61,6
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;