Merge branch 'master' into brands
Conflicts: core/lib/Thelia/Tools/FileManager.php setup/update/2.0.3.sql
This commit is contained in:
@@ -14,7 +14,6 @@ namespace Thelia\Core\Event\Coupon;
|
||||
use Thelia\Core\Event\ActionEvent;
|
||||
use Thelia\Condition\ConditionCollection;
|
||||
use Thelia\Model\Coupon;
|
||||
use Thelia\Model\Exception\InvalidArgumentException;
|
||||
|
||||
/**
|
||||
* Occurring when a Coupon is created or updated
|
||||
|
||||
43
core/lib/Thelia/Core/HttpKernel/Client.php
Normal file
43
core/lib/Thelia/Core/HttpKernel/Client.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* This file is part of the Thelia package. */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : dev@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* For the full copyright and license information, please view the LICENSE.txt */
|
||||
/* file that was distributed with this source code. */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Core\HttpKernel;
|
||||
|
||||
use Symfony\Component\HttpKernel\Client as BaseClient;
|
||||
use Thelia\Core\HttpFoundation\Request;
|
||||
use Symfony\Component\BrowserKit\Request as DomRequest;
|
||||
|
||||
/**
|
||||
* Class Client
|
||||
* @package Thelia\Core\HttpKernel
|
||||
* @author Manuel Raynaud <mraynaud@openstudio.fr>
|
||||
*/
|
||||
class Client extends BaseClient
|
||||
{
|
||||
|
||||
/**
|
||||
* Converts the BrowserKit request to a HttpKernel request.
|
||||
*
|
||||
* @param DomRequest $request A Request instance
|
||||
*
|
||||
* @return Request A Request instance
|
||||
*/
|
||||
protected function filterRequest(DomRequest $request)
|
||||
{
|
||||
$httpRequest = Request::create($request->getUri(), $request->getMethod(), $request->getParameters(), $request->getCookies(), $request->getFiles(), $request->getServer(), $request->getContent());
|
||||
|
||||
$httpRequest->files->replace($this->filterFiles($httpRequest->files->all()));
|
||||
|
||||
return $httpRequest;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -536,4 +536,4 @@ abstract class BaseLoop
|
||||
*/
|
||||
abstract protected function getArgDefinitions();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -190,9 +190,6 @@ class Category extends BaseI18nLoop implements PropelSearchLoopInterface, Search
|
||||
}
|
||||
}
|
||||
|
||||
/* @todo */
|
||||
$notEmpty = $this->getNot_empty();
|
||||
|
||||
return $search;
|
||||
|
||||
}
|
||||
@@ -217,6 +214,7 @@ class Category extends BaseI18nLoop implements PropelSearchLoopInterface, Search
|
||||
->set("DESCRIPTION" , $category->getVirtualColumn('i18n_DESCRIPTION'))
|
||||
->set("POSTSCRIPTUM" , $category->getVirtualColumn('i18n_POSTSCRIPTUM'))
|
||||
->set("PARENT" , $category->getParent())
|
||||
->set("ROOT" , $category->getRoot($category->getId()))
|
||||
->set("URL" , $category->getUrl($this->locale))
|
||||
->set("META_TITLE" , $category->getVirtualColumn('i18n_META_TITLE'))
|
||||
->set("META_DESCRIPTION" , $category->getVirtualColumn('i18n_META_DESCRIPTION'))
|
||||
|
||||
@@ -152,9 +152,6 @@ class Coupon extends BaseI18nLoop implements PropelSearchLoopInterface
|
||||
/** @var ConditionFactory $conditionFactory */
|
||||
$conditionFactory = $this->container->get('thelia.condition.factory');
|
||||
|
||||
/** @var Request $request */
|
||||
$request = $this->container->get('request');
|
||||
|
||||
/** @var MCoupon $coupon */
|
||||
foreach ($loopResult->getResultDataCollection() as $coupon) {
|
||||
|
||||
|
||||
@@ -157,9 +157,6 @@ class Folder extends BaseI18nLoop implements PropelSearchLoopInterface, SearchLo
|
||||
}
|
||||
}
|
||||
|
||||
/* @todo */
|
||||
$notEmpty = $this->getNot_empty();
|
||||
|
||||
return $search;
|
||||
|
||||
}
|
||||
@@ -178,6 +175,7 @@ class Folder extends BaseI18nLoop implements PropelSearchLoopInterface, SearchLo
|
||||
->set("DESCRIPTION" , $folder->getVirtualColumn('i18n_DESCRIPTION'))
|
||||
->set("POSTSCRIPTUM" , $folder->getVirtualColumn('i18n_POSTSCRIPTUM'))
|
||||
->set("PARENT" , $folder->getParent())
|
||||
->set("ROOT" , $folder->getRoot($folder->getId()))
|
||||
->set("URL" , $folder->getUrl($this->locale))
|
||||
->set("META_TITLE" , $folder->getVirtualColumn('i18n_META_TITLE'))
|
||||
->set("META_DESCRIPTION" , $folder->getVirtualColumn('i18n_META_DESCRIPTION'))
|
||||
|
||||
@@ -69,7 +69,7 @@ class Module extends BaseI18nLoop implements PropelSearchLoopInterface
|
||||
new Argument(
|
||||
'order',
|
||||
new TypeCollection(
|
||||
new Type\EnumListType(array('id', 'id_reverse', 'code', 'code_reverse', 'alpha', 'alpha_reverse', 'manual', 'manual_reverse', 'enabled', 'enabled_reverse'))
|
||||
new Type\EnumListType(array('id', 'id_reverse', 'code', 'code_reverse', 'title', 'title_reverse', 'manual', 'manual_reverse', 'enabled', 'enabled_reverse'))
|
||||
),
|
||||
'manual'
|
||||
),
|
||||
@@ -133,10 +133,10 @@ class Module extends BaseI18nLoop implements PropelSearchLoopInterface
|
||||
case "id_reverse":
|
||||
$search->orderById(Criteria::DESC);
|
||||
break;
|
||||
case "alpha":
|
||||
case "title":
|
||||
$search->addAscendingOrderByColumn('i18n_TITLE');
|
||||
break;
|
||||
case "alpha_reverse":
|
||||
case "title_reverse":
|
||||
$search->addDescendingOrderByColumn('i18n_TITLE');
|
||||
break;
|
||||
case "code":
|
||||
|
||||
Reference in New Issue
Block a user