update date display process

This commit is contained in:
Shreesh Arora
2024-10-01 20:00:08 +05:30
parent 4a007d2724
commit 527fa2f048
24 changed files with 62 additions and 35 deletions

View File

@@ -2874,13 +2874,13 @@ abstract class ModuleCore
$overrides = array();
foreach (Tools::scandir($this->getLocalPath().'override', 'php', '', true) as $file) {
$class = basename($file, '.php');
if ($class != 'index') {
$classInfo = array('class' => $class, 'file' => $file, 'type' => null);
if (PrestaShopAutoload::getInstance()->getClassPath($class.'Core')) {
$classInfo['type'] = self::OVERRIDE_TYPE_CORE;
} elseif (Module::getModuleIdByName($class)) {
$classInfo['type'] = self::OVERRIDE_TYPE_MODULE;
} elseif (preg_match('#^modules/([a-zA-Z0-9_-]+)/controllers/(admin|front)/([0-9a-zA-Z-_]+).php#', $file, $matches)) {
$classInfo = array('class' => $class, 'file' => $file, 'type' => null);
if (PrestaShopAutoload::getInstance()->getClassPath($class.'Core')) {
$classInfo['type'] = self::OVERRIDE_TYPE_CORE;
} elseif (Module::getModuleIdByName($class)) {
$classInfo['type'] = self::OVERRIDE_TYPE_MODULE;
} elseif (preg_match('#^modules/([a-zA-Z0-9_-]+)/controllers/(admin|front)/([0-9a-zA-Z-_]+).php#', $file, $matches)) {
if ($class != 'index') {
$classInfo['type'] = self::OVERRIDE_TYPE_MODULE_CONTROLLER;
$classInfo['module'] = $matches[1];
$classInfo['controller_type'] = $matches[2];