Removes container from all Thelia actions, but Modules (#198)

This commit is contained in:
Franck Allimant
2014-01-31 20:04:25 +01:00
committed by Manuel Raynaud
parent 779c33ac79
commit 3fd8f5adbb
4 changed files with 56 additions and 53 deletions

View File

@@ -32,6 +32,7 @@ use Thelia\Core\Event\Module\ModuleDeleteEvent;
use Thelia\Core\Event\Module\ModuleEvent; use Thelia\Core\Event\Module\ModuleEvent;
use Thelia\Core\Event\Module\ModuleToggleActivationEvent; use Thelia\Core\Event\Module\ModuleToggleActivationEvent;
use Thelia\Core\Event\Order\OrderPaymentEvent; use Thelia\Core\Event\Order\OrderPaymentEvent;
use Thelia\Core\Event\TheliaEvents; use Thelia\Core\Event\TheliaEvents;
use Thelia\Core\Event\UpdatePositionEvent; use Thelia\Core\Event\UpdatePositionEvent;
use Thelia\Core\Translation\Translator; use Thelia\Core\Translation\Translator;

View File

@@ -151,7 +151,6 @@ class Order extends BaseAction implements EventSubscriberInterface
} }
protected function createOrder(EventDispatcherInterface $dispatcher, ModelOrder $sessionOrder, Currency $currency, Lang $lang, CartModel $cart, CustomerModel $customer) protected function createOrder(EventDispatcherInterface $dispatcher, ModelOrder $sessionOrder, Currency $currency, Lang $lang, CartModel $cart, CustomerModel $customer)
{ {
$con = \Propel\Runtime\Propel::getConnection( $con = \Propel\Runtime\Propel::getConnection(
OrderTableMap::DATABASE_NAME OrderTableMap::DATABASE_NAME
@@ -342,7 +341,6 @@ class Order extends BaseAction implements EventSubscriberInterface
$event->getDispatcher()->dispatch(TheliaEvents::ORDER_BEFORE_PAYMENT, new OrderEvent($placedOrder)); $event->getDispatcher()->dispatch(TheliaEvents::ORDER_BEFORE_PAYMENT, new OrderEvent($placedOrder));
/* clear session */ /* clear session */
$session $session
->setProcessedOrder($placedOrder) ->setProcessedOrder($placedOrder)
@@ -400,6 +398,7 @@ class Order extends BaseAction implements EventSubscriberInterface
// Build subject and body // Build subject and body
$message->buildMessage($this->parser, $instance); $message->buildMessage($this->parser, $instance);
$this->getMailer()->send($instance); $this->getMailer()->send($instance);
} }
} }

View File

@@ -1,52 +1,52 @@
<?php <?php
/*************************************************************************************/ /*************************************************************************************/
/* */ /* */
/* Thelia */ /* Thelia */
/* */ /* */
/* Copyright (c) OpenStudio */ /* Copyright (c) OpenStudio */
/* email : info@thelia.net */ /* email : info@thelia.net */
/* web : http://www.thelia.net */ /* web : http://www.thelia.net */
/* */ /* */
/* This program is free software; you can redistribute it and/or modify */ /* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */ /* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */ /* the Free Software Foundation; either version 3 of the License */
/* */ /* */
/* This program is distributed in the hope that it will be useful, */ /* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */ /* GNU General Public License for more details. */
/* */ /* */
/* You should have received a copy of the GNU General Public License */ /* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */ /* */
/*************************************************************************************/ /*************************************************************************************/
namespace Thelia\Core\Event\Order; namespace Thelia\Core\Event\Order;
use Thelia\Core\Event\ActionEvent; use Thelia\Core\Event\ActionEvent;
use Thelia\Model\Order; use Thelia\Model\Order;
/** /**
* Class PaymentEvent * Class PaymentEvent
* @package Thelia\Core\Event\Module * @package Thelia\Core\Event\Module
* @author Franck Allimant <franck@cqfdev.fr> * @author Franck Allimant <franck@cqfdev.fr>
*/ */
class OrderPaymentEvent extends ActionEvent class OrderPaymentEvent extends ActionEvent
{ {
/** /**
* @var Order * @var Order
*/ */
protected $order; protected $order;
public function __construct(Order $order) { public function __construct(Order $order) {
$this->order = $order; $this->order = $order;
} }
/** /**
* @return \Thelia\Model\Order * @return \Thelia\Model\Order
*/ */
public function getOrder() public function getOrder()
{ {
return $this->order; return $this->order;
} }
} }

View File

@@ -399,10 +399,13 @@ class CheckPermission extends BaseInstall
// The 'G' modifier is available since PHP 5.1.0 // The 'G' modifier is available since PHP 5.1.0
case 'g': case 'g':
$val *= 1024; $val *= 1024;
break;
case 'm': case 'm':
$val *= 1024; $val *= 1024;
break;
case 'k': case 'k':
$val *= 1024; $val *= 1024;
break;
} }
return $val; return $val;