fix cs
This commit is contained in:
@@ -23,8 +23,6 @@
|
||||
|
||||
namespace Thelia\Tools;
|
||||
|
||||
use Propel\Runtime\ActiveQuery\ModelCriteria;
|
||||
use Propel\Runtime\ActiveRecord\ActiveRecordInterface;
|
||||
use Thelia\Model\Lang;
|
||||
|
||||
/**
|
||||
@@ -69,19 +67,19 @@ class I18n
|
||||
$askedLocale
|
||||
)->findOne();
|
||||
/* or default translation */
|
||||
if(null === $i18n) {
|
||||
if (null === $i18n) {
|
||||
$i18n = $i18nQueryClass::create()
|
||||
->filterById($id)
|
||||
->filterByLocale(
|
||||
Lang::getDefaultLanguage()->getLocale()
|
||||
)->findOne();
|
||||
}
|
||||
if(null === $i18n) { // @todo something else ?
|
||||
if (null === $i18n) { // @todo something else ?
|
||||
$i18n = new $i18nClass();;
|
||||
$i18n->setId($id);
|
||||
foreach($needed as $need) {
|
||||
foreach ($needed as $need) {
|
||||
$method = sprintf('set%s', $need);
|
||||
if(method_exists($i18n, $method)) {
|
||||
if (method_exists($i18n, $method)) {
|
||||
$i18n->$method('DEFAULT ' . strtoupper($need));
|
||||
} else {
|
||||
// @todo throw sg ?
|
||||
|
||||
Reference in New Issue
Block a user