Fehler #1478 disable Dates before now
git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3467 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
parent
96ccad563d
commit
6f00076948
2 changed files with 17 additions and 2 deletions
|
|
@ -70,8 +70,6 @@ class BookingController extends Controller
|
|||
// #TODO Consider changing key of travel dates
|
||||
foreach ($travelProgram->getTravelDates() as $curTravelDate)
|
||||
{
|
||||
|
||||
|
||||
if($curTravelDate->getStatus() != 0){
|
||||
if ($curTravelDate->getName() == $request->query->get('nr'))
|
||||
{
|
||||
|
|
@ -81,10 +79,17 @@ class BookingController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if (!isset($travelDate))
|
||||
{
|
||||
throw $this->createNotFoundException();
|
||||
}
|
||||
$now = new \DateTime();
|
||||
if ($travelDate->getStart() <= $now)
|
||||
{
|
||||
throw $this->createNotFoundException();
|
||||
}
|
||||
|
||||
|
||||
/** @var BookingRequest $bookingRequest */
|
||||
$bookingRequest = new BookingRequest();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue