Working : Coupon Controller refactor

This commit is contained in:
gmorel
2013-09-12 17:39:51 +02:00
parent 972cdcd7fb
commit a56447fef5

View File

@@ -352,17 +352,7 @@ class CouponController extends BaseAdminController
{ {
$this->checkAuth('ADMIN', 'admin.coupon.read'); $this->checkAuth('ADMIN', 'admin.coupon.read');
if ($this->isDebug()) { $this->checkXmlHttpRequest();
if (!$this->getRequest()->isXmlHttpRequest()) {
$this->redirect(
$this->getRoute(
'admin',
array(),
Router::ABSOLUTE_URL
)
);
}
}
/** @var ConstraintFactory $constraintFactory */ /** @var ConstraintFactory $constraintFactory */
$constraintFactory = $this->container->get('thelia.constraint.factory'); $constraintFactory = $this->container->get('thelia.constraint.factory');
@@ -393,17 +383,7 @@ class CouponController extends BaseAdminController
{ {
$this->checkAuth('ADMIN', 'admin.coupon.read'); $this->checkAuth('ADMIN', 'admin.coupon.read');
if ($this->isDebug()) { $this->checkXmlHttpRequest();
if (!$this->getRequest()->isXmlHttpRequest()) {
$this->redirect(
$this->getRoute(
'admin',
array(),
Router::ABSOLUTE_URL
)
);
}
}
$search = CouponQuery::create(); $search = CouponQuery::create();
/** @var Coupon $coupon */ /** @var Coupon $coupon */