Skip to content

Commit 53e4b6d

Browse files
committed
IBX-10937: Lowercase
1 parent f18cdcb commit 53e4b6d

File tree

2 files changed

+36
-2
lines changed

2 files changed

+36
-2
lines changed

src/lib/Persistence/Cache/ContentHandler.php

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,40 @@ function (VersionInfo $versionInfo) {
793793
['content' => $contentIds]
794794
);
795795
}
796+
797+
public function getMissedVersionInfoIds(array $contentIds): array
798+
{
799+
$missedIds = [];
800+
801+
// Try to load the version info list from cache and see which values are missing
802+
$this->getMultipleCacheValues(
803+
$contentIds,
804+
$this->cacheIdentifierGenerator->generateKey(
805+
self::CONTENT_VERSION_INFO_IDENTIFIER,
806+
[],
807+
true
808+
) . '-',
809+
static function (array $cacheMissIds) use (&$missedIds): void {
810+
$missedIds = array_merge($missedIds, $cacheMissIds);
811+
},
812+
function (VersionInfo $versionInfo): array {
813+
return $this->getCacheTagsForVersion($versionInfo);
814+
},
815+
function (VersionInfo $versionInfo) {
816+
return [
817+
$this->cacheIdentifierGenerator->generateKey(
818+
self::CONTENT_VERSION_INFO_IDENTIFIER,
819+
[$versionInfo->contentInfo->id],
820+
true
821+
),
822+
];
823+
},
824+
'',
825+
['content' => $contentIds]
826+
);
827+
828+
return $missedIds;
829+
}
796830
}
797831

798832
class_alias(ContentHandler::class, 'eZ\Publish\Core\Persistence\Cache\ContentHandler');

src/lib/Persistence/Legacy/Content/Type/Gateway/CriterionHandler/ContentTypeGroupName.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ public function apply(
4040
->from(Gateway::CONTENT_TYPE_GROUP_TABLE, 'ctg')
4141
->leftJoin('ctg', Gateway::CONTENT_TYPE_TO_GROUP_ASSIGNMENT_TABLE, 'c_group', 'ctg.id = c_group.group_id')
4242
->andWhere($subQuery->expr()->eq(
43-
'ctg.name',
44-
$qb->createNamedParameter($criterion->getValue(), ParameterType::STRING)
43+
'LOWER(ctg.name)',
44+
$qb->createNamedParameter(strtolower($criterion->getValue()), ParameterType::STRING)
4545
))
4646
->andWhere('c_group.contentclass_id = c.id');
4747

0 commit comments

Comments
 (0)