diff --git a/core/lib/Thelia/Action/HttpException.php b/core/lib/Thelia/Action/HttpException.php index 5541023d7..d889529fa 100644 --- a/core/lib/Thelia/Action/HttpException.php +++ b/core/lib/Thelia/Action/HttpException.php @@ -91,8 +91,6 @@ class HttpException extends BaseAction implements EventSubscriberInterface // Define the template thant shoud be used $this->parser->setTemplateDefinition(TemplateHelper::getInstance()->getActiveFrontTemplate()); - //$event->getRequest()->attributes->set('_view', ConfigQuery::getPageNotFoundView()); - $response = new Response($this->parser->render(ConfigQuery::getPageNotFoundView()), 404); $event->setResponse($response); diff --git a/core/lib/Thelia/Action/Image.php b/core/lib/Thelia/Action/Image.php index 7b5ef0138..3f92c7cc5 100644 --- a/core/lib/Thelia/Action/Image.php +++ b/core/lib/Thelia/Action/Image.php @@ -112,8 +112,6 @@ class Image extends BaseCachedFile implements EventSubscriberInterface throw new \InvalidArgumentException("Cache sub-directory and source file path cannot be null"); } - // echo basename($source_file).": "; - // Find cached file path $cacheFilePath = $this->getCacheFilePath($subdir, $source_file, $event->isOriginalImage(), $event->getOptionsHash()); @@ -391,8 +389,6 @@ class Image extends BaseCachedFile implements EventSubscriberInterface $image->resize(new Box($next_width, $next_height)); - // echo "w=$dest_width, h=$dest_height, nw=$next_width, nh=$next_height, dx=$delta_x, dy=$delta_y, bw=$border_width, bh=$border_height\n"; - if ($resize_mode == self::EXACT_RATIO_WITH_BORDERS) { $border_width = intval(($dest_width - $next_width) / 2); diff --git a/core/lib/Thelia/Command/CreateAdminUser.php b/core/lib/Thelia/Command/CreateAdminUser.php index ad8d386e5..a9b622419 100644 --- a/core/lib/Thelia/Command/CreateAdminUser.php +++ b/core/lib/Thelia/Command/CreateAdminUser.php @@ -83,7 +83,7 @@ class CreateAdminUser extends ContainerAwareCommand { $output->writeln('Please enter the admin user information:'); - $admin = $this->getAdminInfo($input, $output); // new Admin(); + $admin = $this->getAdminInfo($input, $output); $admin->save(); diff --git a/core/lib/Thelia/Command/Install.php b/core/lib/Thelia/Command/Install.php index fd6237d8e..e3b4e981a 100644 --- a/core/lib/Thelia/Command/Install.php +++ b/core/lib/Thelia/Command/Install.php @@ -198,9 +198,6 @@ class Install extends ContainerAwareCommand file_put_contents($configFile, $configContent); - // FA - no, as no further install will be possible - // $fs->remove($sampleConfigFile); - $fs->remove($this->getContainer()->getParameter("kernel.cache_dir")); } diff --git a/core/lib/Thelia/Condition/Implementation/MatchForEveryone.php b/core/lib/Thelia/Condition/Implementation/MatchForEveryone.php index 560ee44c8..9d3979a2b 100644 --- a/core/lib/Thelia/Condition/Implementation/MatchForEveryone.php +++ b/core/lib/Thelia/Condition/Implementation/MatchForEveryone.php @@ -23,7 +23,6 @@ namespace Thelia\Condition\Implementation; -use InvalidArgumentException; /** * Allow every one, perform no check diff --git a/core/lib/Thelia/Condition/Implementation/MatchForXArticles.php b/core/lib/Thelia/Condition/Implementation/MatchForXArticles.php index ab0fe481a..8eeeec1c2 100644 --- a/core/lib/Thelia/Condition/Implementation/MatchForXArticles.php +++ b/core/lib/Thelia/Condition/Implementation/MatchForXArticles.php @@ -23,8 +23,6 @@ namespace Thelia\Condition\Implementation; -use InvalidArgumentException; - use Thelia\Condition\Operators; use Thelia\Exception\InvalidConditionOperatorException; use Thelia\Exception\InvalidConditionValueException; diff --git a/core/lib/Thelia/Controller/Admin/CategoryController.php b/core/lib/Thelia/Controller/Admin/CategoryController.php index 3a006922b..3557c5075 100644 --- a/core/lib/Thelia/Controller/Admin/CategoryController.php +++ b/core/lib/Thelia/Controller/Admin/CategoryController.php @@ -340,24 +340,6 @@ class CategoryController extends AbstractSeoCrudController return $response; } -// $content_id = intval($this->getRequest()->get('content_id')); -// -// if ($content_id > 0) { -// -// $event = new CategoryAddContentEvent( -// $this->getExistingObject(), -// $content_id -// ); -// -// try { -// $this->dispatch(TheliaEvents::CATEGORY_ADD_CONTENT, $event); -// } -// catch (\Exception $ex) { -// // Any error -// return $this->errorPage($ex); -// } -// } - $this->redirectToEditionTemplate(); } diff --git a/core/lib/Thelia/Controller/Admin/SystemLogController.php b/core/lib/Thelia/Controller/Admin/SystemLogController.php index 9dafd78f6..37d27a7be 100644 --- a/core/lib/Thelia/Controller/Admin/SystemLogController.php +++ b/core/lib/Thelia/Controller/Admin/SystemLogController.php @@ -83,27 +83,13 @@ class SystemLogController extends BaseAdminController } } + /** + * @return mixed|\Thelia\Core\HttpFoundation\Response + */ public function defaultAction() { if (null !== $response = $this->checkAuth(AdminResources::SYSTEM_LOG, array(), AccessManager::VIEW)) return $response; - /* - const VAR_LEVEL = "tlog_level"; - const VAR_DESTINATIONS = "tlog_destinations"; - const VAR_PREFIXE = "tlog_prefix"; - const VAR_FILES = "tlog_files"; - const VAR_IP = "tlog_ip"; - const VAR_SHOW_REDIRECT = "tlog_show_redirect"; - - const DEFAULT_LEVEL = self::DEBUG; - const DEFAUT_DESTINATIONS = "Thelia\Log\Destination\TlogDestinationFile"; - const DEFAUT_PREFIXE = "#NUM: #NIVEAU [#FICHIER:#FONCTION()] {#LIGNE} #DATE #HEURE: "; - const DEFAUT_FILES = "*"; - const DEFAUT_IP = ""; - const DEFAUT_SHOW_REDIRECT = 0; - - */ - // Hydrate the general configuration form $systemLogForm = new SystemLogConfigurationForm($this->getRequest(), 'form', array( 'level' => ConfigQuery::read(Tlog::VAR_LEVEL, Tlog::DEFAULT_LEVEL), diff --git a/core/lib/Thelia/Core/Event/Address/AddressCreateOrUpdateEvent.php b/core/lib/Thelia/Core/Event/Address/AddressCreateOrUpdateEvent.php index 05fc909d2..15ef944d7 100644 --- a/core/lib/Thelia/Core/Event/Address/AddressCreateOrUpdateEvent.php +++ b/core/lib/Thelia/Core/Event/Address/AddressCreateOrUpdateEvent.php @@ -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; diff --git a/core/lib/Thelia/Core/Event/Address/AddressEvent.php b/core/lib/Thelia/Core/Event/Address/AddressEvent.php index d36fd7cab..2ef553326 100644 --- a/core/lib/Thelia/Core/Event/Address/AddressEvent.php +++ b/core/lib/Thelia/Core/Event/Address/AddressEvent.php @@ -22,7 +22,7 @@ /*************************************************************************************/ namespace Thelia\Core\Event\Address; -use Symfony\Component\EventDispatcher\Event; + use Thelia\Core\Event\ActionEvent; use Thelia\Model\Address; diff --git a/core/lib/Thelia/Core/Event/Cart/CartEvent.php b/core/lib/Thelia/Core/Event/Cart/CartEvent.php index 784e825fb..d7b8705be 100644 --- a/core/lib/Thelia/Core/Event/Cart/CartEvent.php +++ b/core/lib/Thelia/Core/Event/Cart/CartEvent.php @@ -23,7 +23,6 @@ namespace Thelia\Core\Event\Cart; -use Symfony\Component\EventDispatcher\Event; use Thelia\Core\Event\ActionEvent; use Thelia\Model\Cart; diff --git a/core/lib/Thelia/Core/Event/Customer/CustomerCreateOrUpdateEvent.php b/core/lib/Thelia/Core/Event/Customer/CustomerCreateOrUpdateEvent.php index e7b12238b..86d42e2f4 100644 --- a/core/lib/Thelia/Core/Event/Customer/CustomerCreateOrUpdateEvent.php +++ b/core/lib/Thelia/Core/Event/Customer/CustomerCreateOrUpdateEvent.php @@ -22,9 +22,6 @@ /*************************************************************************************/ namespace Thelia\Core\Event\Customer; -use Symfony\Component\EventDispatcher\Event; -use Thelia\Model\Customer; - /** * Class CustomerCreateOrUpdateEvent * @package Thelia\Core\Event diff --git a/core/lib/Thelia/Core/Event/Customer/CustomerLoginEvent.php b/core/lib/Thelia/Core/Event/Customer/CustomerLoginEvent.php index 943eb5b64..2337da847 100644 --- a/core/lib/Thelia/Core/Event/Customer/CustomerLoginEvent.php +++ b/core/lib/Thelia/Core/Event/Customer/CustomerLoginEvent.php @@ -23,7 +23,6 @@ namespace Thelia\Core\Event\Customer; -use Thelia\Model\Customer; class CustomerLoginEvent extends CustomerEvent { diff --git a/core/lib/Thelia/Core/Event/FeatureProduct/FeatureProductDeleteEvent.php b/core/lib/Thelia/Core/Event/FeatureProduct/FeatureProductDeleteEvent.php index f0e07e37f..7bcab6f4c 100644 --- a/core/lib/Thelia/Core/Event/FeatureProduct/FeatureProductDeleteEvent.php +++ b/core/lib/Thelia/Core/Event/FeatureProduct/FeatureProductDeleteEvent.php @@ -22,7 +22,6 @@ /*************************************************************************************/ namespace Thelia\Core\Event\FeatureProduct; -use Thelia\Model\FeatureProduct; class FeatureProductDeleteEvent extends FeatureProductEvent { diff --git a/core/lib/Thelia/Core/Event/FeatureProduct/FeatureProductUpdateEvent.php b/core/lib/Thelia/Core/Event/FeatureProduct/FeatureProductUpdateEvent.php index 37186f4a9..32f51daca 100644 --- a/core/lib/Thelia/Core/Event/FeatureProduct/FeatureProductUpdateEvent.php +++ b/core/lib/Thelia/Core/Event/FeatureProduct/FeatureProductUpdateEvent.php @@ -22,7 +22,7 @@ /*************************************************************************************/ namespace Thelia\Core\Event\FeatureProduct; -use Thelia\Model\FeatureProduct; + class FeatureProductUpdateEvent extends FeatureProductEvent { diff --git a/core/lib/Thelia/Core/Event/TheliaEvents.php b/core/lib/Thelia/Core/Event/TheliaEvents.php index 24cb3eec6..580fac029 100644 --- a/core/lib/Thelia/Core/Event/TheliaEvents.php +++ b/core/lib/Thelia/Core/Event/TheliaEvents.php @@ -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"; diff --git a/core/lib/Thelia/Core/EventListener/ControllerListener.php b/core/lib/Thelia/Core/EventListener/ControllerListener.php deleted file mode 100644 index 097afb189..000000000 --- a/core/lib/Thelia/Core/EventListener/ControllerListener.php +++ /dev/null @@ -1,72 +0,0 @@ -. */ -/* */ -/*************************************************************************************/ -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 - */ -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) - ); - } -} diff --git a/core/lib/Thelia/Core/Routing/RewritingRouter.php b/core/lib/Thelia/Core/Routing/RewritingRouter.php index 9b736a614..bdf0a6e03 100644 --- a/core/lib/Thelia/Core/Routing/RewritingRouter.php +++ b/core/lib/Thelia/Core/Routing/RewritingRouter.php @@ -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 * */ diff --git a/core/lib/Thelia/Core/Template/Loop/Accessory.php b/core/lib/Thelia/Core/Template/Loop/Accessory.php index 04f121b01..5238b6fbb 100644 --- a/core/lib/Thelia/Core/Template/Loop/Accessory.php +++ b/core/lib/Thelia/Core/Template/Loop/Accessory.php @@ -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; /** * diff --git a/core/lib/Thelia/Core/Template/Loop/AssociatedContent.php b/core/lib/Thelia/Core/Template/Loop/AssociatedContent.php index 9ef9d33da..d67e2bb44 100644 --- a/core/lib/Thelia/Core/Template/Loop/AssociatedContent.php +++ b/core/lib/Thelia/Core/Template/Loop/AssociatedContent.php @@ -31,7 +31,6 @@ use Thelia\Core\Template\Loop\Argument\Argument; use Thelia\Model\ProductAssociatedContentQuery; use Thelia\Model\CategoryAssociatedContentQuery; -use Thelia\Type; /** * diff --git a/core/lib/Thelia/Core/Template/Loop/Coupon.php b/core/lib/Thelia/Core/Template/Loop/Coupon.php index 37ee4712e..53ecfa5c3 100644 --- a/core/lib/Thelia/Core/Template/Loop/Coupon.php +++ b/core/lib/Thelia/Core/Template/Loop/Coupon.php @@ -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 diff --git a/core/lib/Thelia/Core/Template/Loop/Document.php b/core/lib/Thelia/Core/Template/Loop/Document.php index f30676334..0353b8df6 100644 --- a/core/lib/Thelia/Core/Template/Loop/Document.php +++ b/core/lib/Thelia/Core/Template/Loop/Document.php @@ -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()."
"; - if (is_null($source_id) && is_null($id)) { throw new \InvalidArgumentException("If 'source' argument is specified, 'id' or 'source_id' argument should be specified"); } diff --git a/core/lib/Thelia/Core/Template/Loop/Image.php b/core/lib/Thelia/Core/Template/Loop/Image.php index def24ae2a..157259f30 100644 --- a/core/lib/Thelia/Core/Template/Loop/Image.php +++ b/core/lib/Thelia/Core/Template/Loop/Image.php @@ -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
"; - 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); diff --git a/core/lib/Thelia/Core/Template/Loop/OrderCoupon.php b/core/lib/Thelia/Core/Template/Loop/OrderCoupon.php index 449cc1e29..264d7be4e 100644 --- a/core/lib/Thelia/Core/Template/Loop/OrderCoupon.php +++ b/core/lib/Thelia/Core/Template/Loop/OrderCoupon.php @@ -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); diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/DataAccessFunctions.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/DataAccessFunctions.php index a13248d09..d12d8639a 100644 --- a/core/lib/Thelia/Core/Template/Smarty/Plugins/DataAccessFunctions.php +++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/DataAccessFunctions.php @@ -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); diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/UrlGenerator.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/UrlGenerator.php index ac7a7f0f2..ce6e6eae0 100644 --- a/core/lib/Thelia/Core/Template/Smarty/Plugins/UrlGenerator.php +++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/UrlGenerator.php @@ -186,7 +186,6 @@ class UrlGenerator extends AbstractSmartyPlugin protected function getCurrentUrl() { - //return URL::getInstance()->retrieveCurrent($this->request)->toString(); return $this->request->getUri(); } diff --git a/core/lib/Thelia/Core/Template/Smarty/SmartyParser.php b/core/lib/Thelia/Core/Template/Smarty/SmartyParser.php index 3201e1215..d2450fb43 100644 --- a/core/lib/Thelia/Core/Template/Smarty/SmartyParser.php +++ b/core/lib/Thelia/Core/Template/Smarty/SmartyParser.php @@ -82,8 +82,6 @@ class SmartyParser extends Smarty implements ParserInterface $this->setForceCompile(false); } - //$this->enableSecurity(); - // The default HTTP status $this->status = 200; diff --git a/core/lib/Thelia/Core/TheliaHttpKernel.php b/core/lib/Thelia/Core/TheliaHttpKernel.php index 339ea12d2..17f60b3f0 100644 --- a/core/lib/Thelia/Core/TheliaHttpKernel.php +++ b/core/lib/Thelia/Core/TheliaHttpKernel.php @@ -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); diff --git a/core/lib/Thelia/Install/Database.php b/core/lib/Thelia/Install/Database.php index 4fad6d4a2..cefd3ef65 100644 --- a/core/lib/Thelia/Install/Database.php +++ b/core/lib/Thelia/Install/Database.php @@ -66,8 +66,8 @@ class Database ); } } - - for ($i = 0; $i < count($sql); $i ++) { + $size = count($sql); + for ($i = 0; $i < $size; $i ++) { if (!empty($sql[$i])) { $this->connection->query($sql[$i]); } @@ -87,8 +87,8 @@ class Database $query = array(); $tab = explode(";\n", $sql); - - for ($i=0; $idebug("begin transaction"); $database = new Database($con->getWrappedConnection()); try { - for ($i = ++$index; $i < count(self::$version); $i++) { + $size = count(self::$version); + for ($i = ++$index; $i < $size; $i++) { $this->updateToVersion(self::$version[$i], $database, $logger); $updatedVersions[] = self::$version[$i]; } diff --git a/core/lib/Thelia/Model/OrderQuery.php b/core/lib/Thelia/Model/OrderQuery.php index 0dc387406..d9b4ad8b4 100644 --- a/core/lib/Thelia/Model/OrderQuery.php +++ b/core/lib/Thelia/Model/OrderQuery.php @@ -5,7 +5,6 @@ namespace Thelia\Model; use Propel\Runtime\ActiveQuery\Criteria; use Propel\Runtime\ActiveQuery\Join; -use Propel\Runtime\Propel; use Thelia\Model\Base\OrderQuery as BaseOrderQuery; use Thelia\Model\Map\OrderProductTableMap; diff --git a/core/lib/Thelia/Model/Tools/UrlRewritingTrait.php b/core/lib/Thelia/Model/Tools/UrlRewritingTrait.php index 72371201a..b02cf0c6d 100644 --- a/core/lib/Thelia/Model/Tools/UrlRewritingTrait.php +++ b/core/lib/Thelia/Model/Tools/UrlRewritingTrait.php @@ -91,8 +91,6 @@ trait UrlRewritingTrait $urlFilePart = rtrim($cleanString, '.-~_') . ".html"; - // TODO : - // check if URL url already exists, and add a numeric suffix, or the like try { $i=0; while (URL::getInstance()->resolve($urlFilePart)) { diff --git a/core/lib/Thelia/TaxEngine/Calculator.php b/core/lib/Thelia/TaxEngine/Calculator.php index c0f01ea1e..552acab19 100644 --- a/core/lib/Thelia/TaxEngine/Calculator.php +++ b/core/lib/Thelia/TaxEngine/Calculator.php @@ -216,31 +216,6 @@ class Calculator $untaxedPrice -= $currentFixTax; $untaxedPrice = $untaxedPrice / (1+$currentTaxFactor); - /*do { - - $taxType = $taxRule->getTypeInstance(); - $taxType->loadRequirements( $taxRule->getRequirements() ); - - $untaxedPrice -= $taxType->fixAmountRetriever(); - - } while ($taxRule = $this->taxRulesCollection->getPrevious()); - - $taxRule = $this->taxRulesCollection->getLast(); - - $currentTaxFactor = 0; - do { - - $taxType = $taxRule->getTypeInstance(); - $taxType->loadRequirements( $taxRule->getRequirements() ); - - $currentTaxFactor += $taxType->pricePercentRetriever($untaxedPrice); - - $toto = true; - - } while ($taxRule = $this->taxRulesCollection->getPrevious()); - - $untaxedPrice = $untaxedPrice / (1+$currentTaxFactor);*/ - return $untaxedPrice; } } diff --git a/core/lib/Thelia/Type/IntToCombinedIntsListType.php b/core/lib/Thelia/Type/IntToCombinedIntsListType.php index 71783e7ef..777759bca 100644 --- a/core/lib/Thelia/Type/IntToCombinedIntsListType.php +++ b/core/lib/Thelia/Type/IntToCombinedIntsListType.php @@ -89,7 +89,8 @@ class IntToCombinedIntsListType extends BaseType $openingParenthesesCount = 0; $closingParenthesesCount = 0; - for ($i=0; $i