From dd31f0ac31413f48e0d33075199ec3767beb1c0f Mon Sep 17 00:00:00 2001 From: Stanislas Kita Date: Tue, 7 Oct 2025 11:41:53 +0200 Subject: [PATCH] Fix(Core): update classname generation method --- CHANGELOG.md | 1 + inc/container.class.php | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 646e0533..a91bed85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Fix drag and drop - Increased the maximum length of the language column to support longer locale codes - Fix left side menu url +- Fix purge ## [1.22.1] - 2025-10-10 diff --git a/inc/container.class.php b/inc/container.class.php index e6ccd70c..e7396745 100644 --- a/inc/container.class.php +++ b/inc/container.class.php @@ -845,8 +845,7 @@ public static function preItemPurge($item) foreach ($founded_containers as $container) { $itemtypes = json_decode($container['itemtypes']); if (in_array($itemtype, $itemtypes)) { - $classname = 'PluginFields' . $itemtype . getSingular($container['name']); - $classname = preg_replace('/s{2}$/i', 's', $classname); // in case name ends with 'ss' remove last 's' + $classname = self::getClassname($itemtype, $container['name']); $fields = new $classname(); $fields->deleteByCriteria(['items_id' => $item->fields['id']], true); }