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 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 { 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', 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 + 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*} 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}