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

# By Manuel Raynaud (8) and franck (2)
# Via franck
* 'master' of https://github.com/thelia/thelia:
  en_EN -> en_UK, the "en_EN" locale does not exists.
  Smarty inheritance in admin template.
  fix typo in phpdoc
  complete test for foramt_number smarty function
  test foramt_date without datetime object
  create foramt_number smarty function
  remove sqlmap file
  add some phpdoc
  complete test for format_date smarty function
  create new smarty function for displaying date in expected format

Conflicts:
	reset_install.sh
This commit is contained in:
gmorel
2013-09-04 12:01:12 +02:00
56 changed files with 3243 additions and 1526 deletions

View File

@@ -3,7 +3,65 @@
namespace Thelia\Model;
use Thelia\Model\Base\Currency as BaseCurrency;
use Thelia\Core\Event\TheliaEvents;
use Propel\Runtime\Connection\ConnectionInterface;
use Thelia\Core\Event\CurrencyEvent;
class Currency extends BaseCurrency {
}
use \Thelia\Model\Tools\ModelEventDispatcherTrait;
/**
* {@inheritDoc}
*/
public function preInsert(ConnectionInterface $con = null)
{
$this->dispatchEvent(TheliaEvents::BEFORE_CREATECURRENCY, new CurrencyEvent($this));
return true;
}
/**
* {@inheritDoc}
*/
public function postInsert(ConnectionInterface $con = null)
{
$this->dispatchEvent(TheliaEvents::AFTER_CREATECURRENCY, new CurrencyEvent($this));
}
/**
* {@inheritDoc}
*/
public function preUpdate(ConnectionInterface $con = null)
{
$this->dispatchEvent(TheliaEvents::BEFORE_CHANGECURRENCY, new CurrencyEvent($this));
return true;
}
/**
* {@inheritDoc}
*/
public function postUpdate(ConnectionInterface $con = null)
{
$this->dispatchEvent(TheliaEvents::AFTER_CHANGECURRENCY, new CurrencyEvent($this));
}
/**
* {@inheritDoc}
*/
public function preDelete(ConnectionInterface $con = null)
{
$this->dispatchEvent(TheliaEvents::BEFORE_DELETECURRENCY, new CurrencyEvent($this));
return true;
}
/**
* {@inheritDoc}
*/
public function postDelete(ConnectionInterface $con = null)
{
$this->dispatchEvent(TheliaEvents::AFTER_DELETECURRENCY, new CurrencyEvent($this));
}
}

View File

@@ -24,15 +24,33 @@ class Lang extends BaseLang {
return $default_lang;
}
public function getDateFormat() {
public function getDateFormat()
{
return "d/m/Y";
}
public function getTimeFormat() {
public function getTimeFormat()
{
return "H:i:s";
}
public function getDateTimeFormat() {
public function getDateTimeFormat()
{
return "d/m/Y H:i:s";
}
public function getDecimalSeparator()
{
return ".";
}
public function getThousandsSeparator()
{
return " ";
}
public function getDecimals()
{
return 2;
}
}