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\ModuleToggleActivationEvent;
use Thelia\Core\Event\Order\OrderPaymentEvent;
use Thelia\Core\Event\TheliaEvents;
use Thelia\Core\Event\UpdatePositionEvent;
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)
{
$con = \Propel\Runtime\Propel::getConnection(
OrderTableMap::DATABASE_NAME
@@ -342,7 +341,6 @@ class Order extends BaseAction implements EventSubscriberInterface
$event->getDispatcher()->dispatch(TheliaEvents::ORDER_BEFORE_PAYMENT, new OrderEvent($placedOrder));
/* clear session */
$session
->setProcessedOrder($placedOrder)
@@ -400,6 +398,7 @@ class Order extends BaseAction implements EventSubscriberInterface
// Build subject and body
$message->buildMessage($this->parser, $instance);
$this->getMailer()->send($instance);
}
}

View File

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

View File

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