Skip to content

Commit 861298e

Browse files
authored
Fix(Core): update classname generation method (#1024)
1 parent 2bc29df commit 861298e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1313
- Fix drag and drop
1414
- Increased the maximum length of the language column to support longer locale codes
1515
- Fix left side menu url
16+
- Fix purge
1617

1718
## [1.22.1] - 2025-10-10
1819

inc/container.class.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -845,8 +845,7 @@ public static function preItemPurge($item)
845845
foreach ($founded_containers as $container) {
846846
$itemtypes = json_decode($container['itemtypes']);
847847
if (in_array($itemtype, $itemtypes)) {
848-
$classname = 'PluginFields' . $itemtype . getSingular($container['name']);
849-
$classname = preg_replace('/s{2}$/i', 's', $classname); // in case name ends with 'ss' remove last 's'
848+
$classname = self::getClassname($itemtype, $container['name']);
850849
$fields = new $classname();
851850
$fields->deleteByCriteria(['items_id' => $item->fields['id']], true);
852851
}

0 commit comments

Comments
 (0)