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

This commit is contained in:
touffies
2013-11-25 10:20:15 +01:00
2 changed files with 13 additions and 0 deletions

View File

@@ -66,6 +66,7 @@ class Content extends BaseI18nLoop implements PropelSearchLoopInterface
Argument::createBooleanTypeArgument('current_folder'),
Argument::createIntTypeArgument('depth', 1),
Argument::createBooleanOrBothTypeArgument('visible', 1),
Argument::createAnyTypeArgument('title'),
new Argument(
'order',
new TypeCollection(
@@ -148,6 +149,11 @@ class Content extends BaseI18nLoop implements PropelSearchLoopInterface
if ($visible !== BooleanOrBothType::ANY) $search->filterByVisible($visible ? 1 : 0);
$title = $this->getTitle();
if (!is_null($title)) {
$search->where("CASE WHEN NOT ISNULL(`requested_locale_i18n`.ID) THEN `requested_locale_i18n`.`TITLE` ELSE `default_locale_i18n`.`TITLE` END ".Criteria::LIKE." ?", "%".$title."%", \PDO::PARAM_STR);
}
$orders = $this->getOrder();

View File

@@ -61,6 +61,7 @@ class Folder extends BaseI18nLoop implements PropelSearchLoopInterface
Argument::createBooleanTypeArgument('current'),
Argument::createBooleanTypeArgument('not_empty', 0),
Argument::createBooleanOrBothTypeArgument('visible', 1),
Argument::createAnyTypeArgument('title'),
new Argument(
'order',
new TypeCollection(
@@ -115,6 +116,12 @@ class Folder extends BaseI18nLoop implements PropelSearchLoopInterface
}
}
$title = $this->getTitle();
if (!is_null($title)) {
$search->where("CASE WHEN NOT ISNULL(`requested_locale_i18n`.ID) THEN `requested_locale_i18n`.`TITLE` ELSE `default_locale_i18n`.`TITLE` END ".Criteria::LIKE." ?", "%".$title."%", \PDO::PARAM_STR);
}
$visible = $this->getVisible();
if ($visible !== BooleanOrBothType::ANY) $search->filterByVisible($visible ? 1 : 0);