Merge branch 'master' of https://github.com/thelia/thelia
Conflicts: .gitignore
This commit is contained in:
@@ -1,4 +1,28 @@
|
||||
<?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/>. */
|
||||
/* */
|
||||
/**********************************************************************************/
|
||||
|
||||
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Thelia\Core\Thelia;
|
||||
use Thelia\Core\HttpFoundation\Request;
|
||||
|
||||
@@ -7,24 +31,25 @@ use Thelia\Core\HttpFoundation\Request;
|
||||
$env = 'dev';
|
||||
require __DIR__ . '/../core/bootstrap.php';
|
||||
|
||||
$trustIp = array(
|
||||
// List of allowed IP
|
||||
$trustedIp = array(
|
||||
'::1',
|
||||
'127.0.0.1',
|
||||
'192.168.56.1'
|
||||
);
|
||||
|
||||
$request = Request::createFromGlobals();
|
||||
|
||||
if ( false === in_array($request->getClientIp(), $trustIp)) {
|
||||
//change request to send to a 404 error page
|
||||
exit;
|
||||
}
|
||||
|
||||
$thelia = new Thelia("dev", true);
|
||||
|
||||
if ( false === in_array($request->getClientIp(), $trustedIp)) {
|
||||
// Redirect 401 Unauthorized
|
||||
$response = new Response('Unauthorized', 401);
|
||||
$thelia->terminate($request, $response);
|
||||
}
|
||||
|
||||
$response = $thelia->handle($request)->prepare($request)->send();
|
||||
|
||||
$thelia->terminate($request, $response);
|
||||
|
||||
echo "\n<!-- page parsed in : " . (microtime(true) - $thelia->getStartTime())." s. -->";
|
||||
echo "\n<!-- memory peak : " . memory_get_peak_usage()/1024/1024 . " MiB. -->";
|
||||
echo "\n<!-- memory peak : " . memory_get_peak_usage()/1024/1024 . " MiB. -->";
|
||||
|
||||
85
web/test_to_remove/datas_coupon_edit.json
Executable file
85
web/test_to_remove/datas_coupon_edit.json
Executable file
@@ -0,0 +1,85 @@
|
||||
{
|
||||
"breadcrumb" : [
|
||||
{
|
||||
"url" : "0",
|
||||
"display" : "Racine",
|
||||
"edit" : "",
|
||||
"browse" : ""
|
||||
}
|
||||
],
|
||||
"categories" : [
|
||||
{
|
||||
"id" : "1",
|
||||
"ligne" : "1",
|
||||
"classement" : "1",
|
||||
"titre" : "Boyaux",
|
||||
"langue_courante" : true,
|
||||
"parent" : 0
|
||||
},
|
||||
{
|
||||
"id" : "18",
|
||||
"ligne" : "1",
|
||||
"classement" : "2",
|
||||
"titre" : "Epices \/ condiments",
|
||||
"langue_courante" : true,
|
||||
"parent" : 0
|
||||
},
|
||||
{
|
||||
"id" : "100",
|
||||
"ligne" : "1",
|
||||
"classement" : "3",
|
||||
"titre" : "Emballage",
|
||||
"langue_courante" : true,
|
||||
"parent" : 0
|
||||
},
|
||||
{
|
||||
"id" : "194",
|
||||
"ligne" : "1",
|
||||
"classement" : "4",
|
||||
"titre" : "Petits mat\u00e9riels",
|
||||
"langue_courante" : true,
|
||||
"parent" : 0
|
||||
},
|
||||
{
|
||||
"id" : "355",
|
||||
"ligne" : "1",
|
||||
"classement" : "5",
|
||||
"titre" : "Materiel de cuisine",
|
||||
"langue_courante" : true,
|
||||
"parent" : 0
|
||||
},
|
||||
{
|
||||
"id" : "426",
|
||||
"ligne" : "0",
|
||||
"classement" : "6",
|
||||
"titre" : "Bacs",
|
||||
"langue_courante" : true,
|
||||
"parent" : 0
|
||||
},
|
||||
{
|
||||
"id" : "458",
|
||||
"ligne" : "1",
|
||||
"classement" : "7",
|
||||
"titre" : "Hygi\u00e8ne & entretien",
|
||||
"langue_courante" : true,
|
||||
"parent" : 0
|
||||
},
|
||||
{
|
||||
"id" : "592",
|
||||
"ligne" : "1",
|
||||
"classement" : "8",
|
||||
"titre" : "Art de la table",
|
||||
"langue_courante" : true,
|
||||
"parent" : 0
|
||||
},
|
||||
{
|
||||
"id" : "601",
|
||||
"ligne" : "1",
|
||||
"classement" : "9",
|
||||
"titre" : "Mat\u00e9riels",
|
||||
"langue_courante" : true,
|
||||
"parent" : 0
|
||||
}
|
||||
],
|
||||
"products":[]
|
||||
}
|
||||
Reference in New Issue
Block a user