From 48e31b11450074575f244da6a1e963987e03fba1 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Sat, 14 Dec 2013 13:27:09 +0100 Subject: [PATCH 1/6] fix link in admin footer --- templates/backOffice/default/admin-layout.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/backOffice/default/admin-layout.tpl b/templates/backOffice/default/admin-layout.tpl index 5649f5807..da4cdc3e6 100755 --- a/templates/backOffice/default/admin-layout.tpl +++ b/templates/backOffice/default/admin-layout.tpl @@ -222,8 +222,8 @@

{intl l='© Thelia 2013'} - {intl l='Published by OpenStudio'} - - {intl l='Thelia support forum'} - - {intl l='Thelia contributions'} + - {intl l='Thelia support forum'} + - {intl l='Thelia contributions'}

{module_include location='in_footer'} @@ -269,4 +269,4 @@ {module_include location='footer_js'} - \ No newline at end of file + From aa66067f0ecf6b03a24c026170f905a999680b36 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Sat, 14 Dec 2013 13:50:55 +0100 Subject: [PATCH 2/6] fix bad product assignation in feature_value loop --- templates/frontOffice/default/product.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/frontOffice/default/product.html b/templates/frontOffice/default/product.html index eaea6b7b4..a5d2d1fdc 100755 --- a/templates/frontOffice/default/product.html +++ b/templates/frontOffice/default/product.html @@ -27,7 +27,7 @@ {/loop} {/loop} {loop name="brand.feature" type="feature" product="{$ID}" title="isbn"} - {loop name="brand.value" type="feature_value" feature="{$ID}" product=$product_id} + {loop name="brand.value" type="feature_value" feature="{$ID}" product="{product attr="id"}"} {/loop} {/loop} From f4c5f23d00bfae2a2995a84a6f3e2ff553dca65d Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Sat, 14 Dec 2013 14:16:45 +0100 Subject: [PATCH 3/6] Change AdminLog logging request behavior, fixing issue #145 --- .../Controller/Admin/SessionController.php | 2 +- core/lib/Thelia/Controller/BaseController.php | 2 +- .../lib/Thelia/Core/HttpFoundation/Request.php | 18 ++++++++++++++++++ core/lib/Thelia/Model/AdminLog.php | 4 ++-- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/core/lib/Thelia/Controller/Admin/SessionController.php b/core/lib/Thelia/Controller/Admin/SessionController.php index 0f6f1a105..bddfd32df 100755 --- a/core/lib/Thelia/Controller/Admin/SessionController.php +++ b/core/lib/Thelia/Controller/Admin/SessionController.php @@ -99,7 +99,7 @@ class SessionController extends BaseAdminController $this->getSecurityContext()->setAdminUser($user); // Log authentication success - AdminLog::append("admin", "LOGIN", "Authentication successful", $request, $user); + AdminLog::append("admin", "LOGIN", "Authentication successful", $request, $user, false); /** * FIXME: we have tou find a way to send cookie diff --git a/core/lib/Thelia/Controller/BaseController.php b/core/lib/Thelia/Controller/BaseController.php index a8f7b3a63..775861c32 100755 --- a/core/lib/Thelia/Controller/BaseController.php +++ b/core/lib/Thelia/Controller/BaseController.php @@ -147,7 +147,7 @@ abstract class BaseController extends ContainerAware } /** - * @return \Symfony\Component\HttpFoundation\Request + * @return \Thelia\Core\HttpFoundation\Request */ protected function getRequest() { diff --git a/core/lib/Thelia/Core/HttpFoundation/Request.php b/core/lib/Thelia/Core/HttpFoundation/Request.php index 8e77ad865..84cdcd760 100755 --- a/core/lib/Thelia/Core/HttpFoundation/Request.php +++ b/core/lib/Thelia/Core/HttpFoundation/Request.php @@ -34,6 +34,11 @@ use Symfony\Component\HttpFoundation\Request as BaseRequest; class Request extends BaseRequest { + private $excludeContent = array( + 'username', + 'password' + ); + public function getProductId() { return $this->get("product_id"); @@ -66,4 +71,17 @@ class Request extends BaseRequest { return parent::getSession(); } + + public function toString($withContent = true) + { + $string = + sprintf('%s %s %s', $this->getMethod(), $this->getRequestUri(), $this->server->get('SERVER_PROTOCOL'))."\r\n". + $this->headers."\r\n"; + + if (true === $withContent) { + $string .= $this->getContent(); + } + + return $string; + } } diff --git a/core/lib/Thelia/Model/AdminLog.php b/core/lib/Thelia/Model/AdminLog.php index 018fa00d3..169891c67 100755 --- a/core/lib/Thelia/Model/AdminLog.php +++ b/core/lib/Thelia/Model/AdminLog.php @@ -18,7 +18,7 @@ class AdminLog extends BaseAdminLog * @param Request $request * @param Base\Admin $adminUser */ - public static function append($resource, $action, $message, Request $request, BaseAdminUser $adminUser = null) { + public static function append($resource, $action, $message, Request $request, BaseAdminUser $adminUser = null, $withRequestContent = true) { $log = new AdminLog(); @@ -29,7 +29,7 @@ class AdminLog extends BaseAdminLog ->setResource($resource) ->setAction($action) ->setMessage($message) - ->setRequest($request->__toString()) + ->setRequest($request->toString($withRequestContent)) ; try { From 412e5e92530e45f655a88e5afb0fc606878003d3 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Sat, 14 Dec 2013 15:19:34 +0100 Subject: [PATCH 4/6] comment missing js file --- templates/backOffice/default/product-edit.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/backOffice/default/product-edit.html b/templates/backOffice/default/product-edit.html index e0266d637..8977a4090 100755 --- a/templates/backOffice/default/product-edit.html +++ b/templates/backOffice/default/product-edit.html @@ -144,9 +144,9 @@ {/javascripts} - {javascripts file='assets/js/jquery-ui-1.10.3.custom.min.js'} + {*javascripts file='assets/js/jquery-ui-1.10.3.custom.min.js'} - {/javascripts} + {/javascripts*} From 06fa5fa1e59c766f147bfa871f6fb92b93b0a07f Mon Sep 17 00:00:00 2001 From: Luis Cordova Date: Sat, 14 Dec 2013 17:18:44 +0100 Subject: [PATCH 5/6] update profil translation --- templates/backOffice/default/I18n/en_US.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/backOffice/default/I18n/en_US.php b/templates/backOffice/default/I18n/en_US.php index fa5eaf663..c57410ab1 100755 --- a/templates/backOffice/default/I18n/en_US.php +++ b/templates/backOffice/default/I18n/en_US.php @@ -5,7 +5,7 @@ return array( 'Version %ver' => 'Version %ver', 'View site' => 'View site', 'View shop' => 'View shop', - 'Profil' => 'Profil', + 'Profil' => 'Profile', 'Close administation session' => 'Close administation session', 'Logout' => 'Logout', 'Home' => 'Home', From 8e663964c1f023f3f4fc9c8b72ce9b871724ae04 Mon Sep 17 00:00:00 2001 From: DirtyF Date: Sat, 14 Dec 2013 20:24:22 +0100 Subject: [PATCH 6/6] add phpbrew as a solution to handle PHP on Mac OSX --- Readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index 392af4339..fe90c50cc 100755 --- a/Readme.md +++ b/Readme.md @@ -30,8 +30,8 @@ Requirements If you use Mac OSX, it still doesn't use php 5.4 as default php version... There are many solutions for you : -* use linux (the best one) -* use last MAMP version and put the php bin directory in your path : +* use [phpbrew](https://github.com/c9s/phpbrew) +* use last MAMP version and put the php bin directory in your path: ```bash export PATH=/Applications/MAMP/bin/php/php5.4.x/bin/:$PATH