Working : Coupon Controller refactor
This commit is contained in:
@@ -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 */
|
||||||
|
|||||||
Reference in New Issue
Block a user