Modif des droits sur les modules
This commit is contained in:
@@ -5,6 +5,7 @@ namespace ClickAndCollect\Controller\backOffice;
|
||||
use ClickAndCollect\ClickAndCollect;
|
||||
use PointRetrait\Model\PdrPlacesQuery;
|
||||
use PointRetrait\Model\PdrPlaces;
|
||||
use PointRetrait\Model\PdrScheduleQuery;
|
||||
use Propel\Runtime\Map\TableMap;
|
||||
use Propel\Runtime\Propel;
|
||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
@@ -106,15 +107,23 @@ class PlaceController extends BaseAdminController
|
||||
return $response;
|
||||
|
||||
$placeId = $this->getRequest()->get('attr-place-id');
|
||||
$query = PdrPlacesQuery::create()->findById($placeId);
|
||||
if ($query === null)
|
||||
$query1 = PdrScheduleQuery::create()->findByIdPlace($placeId);
|
||||
if ($query1 === null)
|
||||
$error_msg = "Place not found by Id";
|
||||
else
|
||||
{
|
||||
else {
|
||||
$con = Propel::getConnection();
|
||||
$con->beginTransaction();
|
||||
$query->delete($con);
|
||||
$query1->delete($con);
|
||||
$con->commit();
|
||||
|
||||
$query2 = PdrPlacesQuery::create()->findById($placeId);
|
||||
if ($query2 === null)
|
||||
$error_msg = "Place not found by Id";
|
||||
else {
|
||||
$con->beginTransaction();
|
||||
$query2->delete($con);
|
||||
$con->commit();
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->getRequest()->request->get("success_url") == null) {
|
||||
|
||||
Reference in New Issue
Block a user