Merge branch 'master' of github.com:thelia/thelia into cleanmaster

This commit is contained in:
Etienne Roudeix
2013-12-16 09:11:21 +01:00
9 changed files with 31 additions and 13 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -147,7 +147,7 @@ abstract class BaseController extends ContainerAware
}
/**
* @return \Symfony\Component\HttpFoundation\Request
* @return \Thelia\Core\HttpFoundation\Request
*/
protected function getRequest()
{

View File

@@ -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;
}
}

View File

@@ -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 {

View File

@@ -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',

View File

@@ -222,8 +222,8 @@
<div class="container">
<p>{intl l='&copy; Thelia 2013'}
- <a href="http://www.openstudio.fr/" target="_blank">{intl l='Published by OpenStudio'}</a>
- <a href="http://forum.thelia.net/" target="_blank">{intl l='Thelia support forum'}</a>
- <a href="http://contrib.thelia.net/" target="_blank">{intl l='Thelia contributions'}</a>
- <a href="http://thelia.net/forum" target="_blank">{intl l='Thelia support forum'}</a>
- <a href="#" target="_blank">{intl l='Thelia contributions'}</a>
</p>
{module_include location='in_footer'}
@@ -269,4 +269,4 @@
{module_include location='footer_js'}
</body>
</html>
</html>

View File

@@ -144,9 +144,9 @@
<script src="{$asset_url}"></script>
{/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'}
<script src="{$asset_url}"></script>
{/javascripts}
{/javascripts*}
<script src="{url file='/tinymce/tinymce.min.js'}"></script>

View File

@@ -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"}"}
<meta itemprop="productID" content="isbn:{$TITLE}">
{/loop}
{/loop}