remove unused code
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Core\Event\Address;
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
|
||||
use Thelia\Core\Event\ActionEvent;
|
||||
use Thelia\Model\Address;
|
||||
use Thelia\Model\Customer;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Core\Event\Address;
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
|
||||
use Thelia\Core\Event\ActionEvent;
|
||||
use Thelia\Model\Address;
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
namespace Thelia\Core\Event\Cart;
|
||||
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
use Thelia\Core\Event\ActionEvent;
|
||||
use Thelia\Model\Cart;
|
||||
|
||||
|
||||
@@ -22,9 +22,6 @@
|
||||
/*************************************************************************************/
|
||||
namespace Thelia\Core\Event\Customer;
|
||||
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
use Thelia\Model\Customer;
|
||||
|
||||
/**
|
||||
* Class CustomerCreateOrUpdateEvent
|
||||
* @package Thelia\Core\Event
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
namespace Thelia\Core\Event\Customer;
|
||||
|
||||
use Thelia\Model\Customer;
|
||||
|
||||
class CustomerLoginEvent extends CustomerEvent
|
||||
{
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Core\Event\FeatureProduct;
|
||||
use Thelia\Model\FeatureProduct;
|
||||
|
||||
class FeatureProductDeleteEvent extends FeatureProductEvent
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Core\Event\FeatureProduct;
|
||||
use Thelia\Model\FeatureProduct;
|
||||
|
||||
|
||||
class FeatureProductUpdateEvent extends FeatureProductEvent
|
||||
{
|
||||
|
||||
@@ -219,7 +219,6 @@ final class TheliaEvents
|
||||
const COUNTRY_UPDATE = "action.updateCountry";
|
||||
const COUNTRY_DELETE = "action.deleteCountry";
|
||||
const COUNTRY_TOGGLE_DEFAULT = "action.toggleCountryDefault";
|
||||
//const COUNTRY_UPDATE_POSITION = "action.updateFolderPosition";
|
||||
|
||||
const BEFORE_CREATECOUNTRY = "action.before_createCountry";
|
||||
const AFTER_CREATECOUNTRY = "action.after_createCountry";
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
<?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\EventListener;
|
||||
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Symfony\Component\HttpKernel\KernelEvents;
|
||||
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
|
||||
use Thelia\Core\Factory\ActionEventFactory;
|
||||
use Thelia\Core\Template\ParserContext;
|
||||
|
||||
/**
|
||||
*
|
||||
* Action are dispatched here.
|
||||
*
|
||||
* A factory is used for creating appropriate action object
|
||||
*
|
||||
* Class ControllerListener
|
||||
* @package Thelia\Core\EventListener
|
||||
* @author Manuel Raynaud <mraynaud@openstudio.fr>
|
||||
*/
|
||||
class ControllerListener implements EventSubscriberInterface
|
||||
{
|
||||
/**
|
||||
* @var ParserContext the parser context
|
||||
*/
|
||||
protected $parserContext;
|
||||
|
||||
public function __construct(ParserContext $parserContext)
|
||||
{
|
||||
$this->parserContext = $parserContext;
|
||||
}
|
||||
|
||||
public function onKernelController(FilterControllerEvent $event)
|
||||
{
|
||||
$dispatcher = $event->getDispatcher();
|
||||
$request = $event->getRequest();
|
||||
|
||||
if (false !== $action = $request->get("action")) {
|
||||
//search corresponding action
|
||||
$event = new ActionEventFactory($request, $action, $event->getKernel()->getContainer()->getParameter("thelia.actionEvent"));
|
||||
$actionEvent = $event->createActionEvent();
|
||||
$dispatcher->dispatch("action.".$action, $actionEvent);
|
||||
}
|
||||
}
|
||||
|
||||
public static function getSubscribedEvents()
|
||||
{
|
||||
return array(
|
||||
KernelEvents::CONTROLLER => array('onKernelController', 0)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,6 @@ use Symfony\Component\Routing\Matcher\RequestMatcherInterface;
|
||||
use Symfony\Component\Routing\RequestContext;
|
||||
use Symfony\Component\Routing\RouteCollection;
|
||||
use Symfony\Component\Routing\RouterInterface;
|
||||
use Thelia\Exception\RedirectException;
|
||||
use Thelia\Exception\UrlRewritingException;
|
||||
use Thelia\Model\ConfigQuery;
|
||||
use Thelia\Tools\Redirect;
|
||||
@@ -161,7 +160,6 @@ class RewritingRouter implements RouterInterface, RequestMatcherInterface
|
||||
*
|
||||
* @throws \Exception|\Thelia\Exception\UrlRewritingException
|
||||
* @throws \Symfony\Component\Routing\Exception\ResourceNotFoundException
|
||||
* @throws \Thelia\Exception\RedirectException
|
||||
* @return array An array of parameters
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,6 @@ use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
||||
use Thelia\Core\Template\Loop\Argument\Argument;
|
||||
|
||||
use Thelia\Model\AccessoryQuery;
|
||||
use Thelia\Type;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -31,7 +31,6 @@ use Thelia\Core\Template\Loop\Argument\Argument;
|
||||
|
||||
use Thelia\Model\ProductAssociatedContentQuery;
|
||||
use Thelia\Model\CategoryAssociatedContentQuery;
|
||||
use Thelia\Type;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -36,7 +36,6 @@ use Thelia\Core\Template\Loop\Argument\ArgumentCollection;
|
||||
use Thelia\Coupon\Type\CouponInterface;
|
||||
use Thelia\Model\Coupon as MCoupon;
|
||||
use Thelia\Model\CouponQuery;
|
||||
use Thelia\Type;
|
||||
|
||||
/**
|
||||
* Coupon Loop
|
||||
|
||||
@@ -165,8 +165,6 @@ class Document extends BaseI18nLoop implements PropelSearchLoopInterface
|
||||
$source_id = $this->getSourceId();
|
||||
$id = $this->getId();
|
||||
|
||||
// echo "source = ".$this->getSource().", id=".$source_id." - ".$this->getArg('source_id')->getValue()."<br />";
|
||||
|
||||
if (is_null($source_id) && is_null($id)) {
|
||||
throw new \InvalidArgumentException("If 'source' argument is specified, 'id' or 'source_id' argument should be specified");
|
||||
}
|
||||
|
||||
@@ -180,8 +180,6 @@ class Image extends BaseI18nLoop implements PropelSearchLoopInterface
|
||||
$source_id = $this->getSourceId();
|
||||
$id = $this->getId();
|
||||
|
||||
//echo "source = ".$this->getSourceId()."source_id=$source_id, id=$id<br />";
|
||||
|
||||
if (is_null($source_id) && is_null($id)) {
|
||||
throw new \InvalidArgumentException("If 'source' argument is specified, 'id' or 'source_id' argument should be specified");
|
||||
}
|
||||
@@ -235,7 +233,6 @@ class Image extends BaseI18nLoop implements PropelSearchLoopInterface
|
||||
if (!is_null($exclude))
|
||||
$search->filterById($exclude, Criteria::NOT_IN);
|
||||
|
||||
// echo "sql=".$search->toString();
|
||||
return $search;
|
||||
|
||||
}
|
||||
@@ -273,10 +270,6 @@ class Image extends BaseI18nLoop implements PropelSearchLoopInterface
|
||||
}
|
||||
|
||||
foreach ($loopResult->getResultDataCollection() as $result) {
|
||||
// Create image processing event
|
||||
|
||||
// ERO : following is duplicated, guess it's useless at this point
|
||||
//$event = new ImageEvent($this->request);
|
||||
|
||||
// Setup required transformations
|
||||
if (! is_null($width)) $event->setWidth($width);
|
||||
|
||||
@@ -78,19 +78,11 @@ class OrderCoupon extends BaseLoop implements PropelSearchLoopInterface
|
||||
/** @var OrderCoupon $orderCoupon */
|
||||
foreach ($loopResult->getResultDataCollection() as $orderCoupon) {
|
||||
$loopResultRow = new LoopResultRow($orderCoupon);
|
||||
/*$conditions = $conditionFactory->unserializeConditionCollection(
|
||||
$orderCoupon->getSerializedConditions()
|
||||
);*/
|
||||
|
||||
$now = time();
|
||||
$datediff = $orderCoupon->getExpirationDate()->getTimestamp() - $now;
|
||||
$daysLeftBeforeExpiration = floor($datediff/(60*60*24));
|
||||
|
||||
/*$cleanedConditions = array();
|
||||
|
||||
foreach ($conditions->getConditions() as $condition) {
|
||||
$cleanedConditions[] = $condition->getToolTip();
|
||||
}*/
|
||||
$loopResultRow->set("ID", $orderCoupon->getId())
|
||||
->set("CODE", $orderCoupon->getCode())
|
||||
->set("TITLE", $orderCoupon->getTitle())
|
||||
@@ -100,8 +92,6 @@ class OrderCoupon extends BaseLoop implements PropelSearchLoopInterface
|
||||
->set("IS_CUMULATIVE", $orderCoupon->getIsCumulative())
|
||||
->set("IS_REMOVING_POSTAGE", $orderCoupon->getIsRemovingPostage())
|
||||
->set("IS_AVAILABLE_ON_SPECIAL_OFFERS", $orderCoupon->getIsAvailableOnSpecialOffers())
|
||||
//->set("AMOUNT", $orderCoupon->getAmount())
|
||||
//->set("APPLICATION_CONDITIONS", $cleanedConditions)
|
||||
->set("DAY_LEFT_BEFORE_EXPIRATION", $daysLeftBeforeExpiration)
|
||||
;
|
||||
$loopResult->addRow($loopResultRow);
|
||||
|
||||
@@ -170,12 +170,6 @@ class DataAccessFunctions extends AbstractSmartyPlugin
|
||||
{
|
||||
switch ($params["ask"]) {
|
||||
case "default":
|
||||
/*if (array_key_exists('defaultCountry', self::$dataAccessCache)) {
|
||||
$defaultCountry = self::$dataAccessCache['defaultCountry'];
|
||||
} else {
|
||||
$defaultCountry = CountryQuery::create()->findOneByByDefault(1);
|
||||
self::$dataAccessCache['defaultCountry'] = $defaultCountry;
|
||||
}*/
|
||||
$defaultCountry = CountryQuery::create()->filterByByDefault(1)->limit(1);
|
||||
|
||||
return $this->dataAccessWithI18n("defaultCountry", $params, $defaultCountry);
|
||||
|
||||
@@ -186,7 +186,6 @@ class UrlGenerator extends AbstractSmartyPlugin
|
||||
|
||||
protected function getCurrentUrl()
|
||||
{
|
||||
//return URL::getInstance()->retrieveCurrent($this->request)->toString();
|
||||
return $this->request->getUri();
|
||||
}
|
||||
|
||||
|
||||
@@ -82,8 +82,6 @@ class SmartyParser extends Smarty implements ParserInterface
|
||||
$this->setForceCompile(false);
|
||||
}
|
||||
|
||||
//$this->enableSecurity();
|
||||
|
||||
// The default HTTP status
|
||||
$this->status = 200;
|
||||
|
||||
|
||||
@@ -79,7 +79,6 @@ class TheliaHttpKernel extends HttpKernel
|
||||
*/
|
||||
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
|
||||
{
|
||||
//$request->headers->set('X-Php-Ob-Level', ob_get_level());
|
||||
if ($type == HttpKernelInterface::MASTER_REQUEST) {
|
||||
$request = $this->initSession($request);
|
||||
$this->initParam($request);
|
||||
|
||||
Reference in New Issue
Block a user