Add files via upload

This commit is contained in:
Markines16 2021-06-08 14:46:12 +02:00 committed by GitHub
parent db34538d41
commit 60170ca731
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,10 +17,10 @@ class FormHall extends Form {
if($hall) if($hall)
$this->og_hall = $hall; $this->og_hall = $hall;
if($option == "edit_hall") if($option == "edit_hall" && $hall)
$options = array("action" => "./?state=".$option."&number=".$hall->getNumber()."&editing=true"); $options = array("action" => "./?state=".$option."&number=".$hall->getNumber()."&editing=true");
else else
$options = array("action" => "./?state=".$option."&number=".$hall->getNumber()."&editing=false"); $options = array("action" => "./?state=".$option."&editing=false");
parent::__construct('formHall',$options); parent::__construct('formHall',$options);
} }
@ -187,7 +187,11 @@ class FormHall extends Form {
FormHall::prepare_message( $msg ); FormHall::prepare_message( $msg );
} }
else if($this->option == "edit_hall"){ else if($this->option == "edit_hall"){
$msg = Hall::edit_hall($number,$this->cinema, $rows, $cols, $seats, $seats_map, $this->og_hall->getNumber()); if($this->og_hall)
$msg = Hall::edit_hall($number,$this->cinema, $rows, $cols, $seats, $seats_map, $this->og_hall->getNumber());
else
$msg = "La sala que intentas editar ya no existe";
FormHall::prepare_message( $msg ); FormHall::prepare_message( $msg );
} }
} }