Skip to content
Permalink
Browse files

Fix I18n when strictly mode is enable and only one I18n is present

  • Loading branch information...
lopes-vincent committed Jul 1, 2019
1 parent f1b0497 commit 976027a917aa45ce2abf189d05d5a35d62317725
Showing with 0 additions and 20 deletions.
  1. +0 −20 core/lib/Thelia/Model/Tools/ModelCriteriaTools.php
@@ -73,16 +73,6 @@ public static function getFrontEndI18n(
);
$requestedLocaleJoin->setJoinType($forceReturn === false ? Criteria::INNER_JOIN : Criteria::LEFT_JOIN);
$defaultLocaleJoin = new Join();
$defaultLocaleJoin->addExplicitCondition(
$localeAlias,
$foreignKey,
null,
$foreignTable . '_i18n',
'ID',
$defaultLocaleI18nAlias
);
$search->addJoinObject($requestedLocaleJoin, $requestedLocaleI18nAlias)
->addJoinCondition(
$requestedLocaleI18nAlias,
@@ -93,16 +83,6 @@ public static function getFrontEndI18n(
)
;
$search->addJoinObject($defaultLocaleJoin, $defaultLocaleI18nAlias)
->addJoinCondition(
$defaultLocaleI18nAlias,
'`' . $defaultLocaleI18nAlias . '`.LOCALE <> ?',
$requestedLocale,
null,
\PDO::PARAM_STR
)
;
$search->withColumn(
'NOT ISNULL(`' . $requestedLocaleI18nAlias . '`.`ID`)',
$aliasPrefix . 'IS_TRANSLATED'

0 comments on commit 976027a

Please sign in to comment.
You can’t perform that action at this time.