From 28ef4cfc55b0fca53420991ec8a1c63f469e3f92 Mon Sep 17 00:00:00 2001 From: Repellent Date: Mon, 12 Jan 2026 15:08:44 +0500 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=B2=D0=BE=D0=B7=D0=BD=D0=B8=D0=BA=D0=B0=D1=8E=D1=89=D0=B0?= =?UTF-8?q?=D1=8F=20=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=20=D0=BA=D0=BB=D0=B8?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=9F=D0=B5=D1=80=D0=B5=D1=83=D1=81=D1=82=D0=B0?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=B8=D1=82=D1=8C=20=D0=BC=D0=BE=D0=B4=D1=83?= =?UTF-8?q?=D0=BB=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/class.modules.php | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/class/class.modules.php b/class/class.modules.php index 9b84ba9..8d2279e 100644 --- a/class/class.modules.php +++ b/class/class.modules.php @@ -318,8 +318,21 @@ // Получаем данные модуля $modules = $this->_modules; - // Выбираем нужный нам модуль - $module = $modules[MODULE_PATH]; + // Выбираем нужный нам модуль (текущие данные из системы) + $module = $modules[MODULE_PATH]; + + // ПРИНУДИТЕЛЬНО подгружаем данные из info.php во ВРЕМЕННУЮ переменную + $module_info_file = BASE_DIR . '/modules/' . MODULE_PATH . '/info.php'; + if (file_exists($module_info_file)) { + // Чтобы не затереть основной $module, временно сохраняем текущий + $current_module_data = $module; + + include($module_info_file); + + // Теперь объединяем: берем старые данные и накладываем поверх них данные из файла + // Это сохранит ModuleName и другие поля, которых нет в info.php + $module = array_merge($current_module_data, $module); + } // Удаляем информацию о модуле в таблице module $sql = " @@ -565,17 +578,17 @@ $files = glob($directory . '*', GLOB_MARK); - foreach ($files as $file) - { - if (substr($file, -1) == '/') - { - $this->moduleRemove($file); - } - else - { - unlink($file); - } - } + foreach ($files as $file) + { + if (substr($file, -1) == '/') + { + $this->moduleRemove($file); + } + elseif (!is_dir($file)) + { + unlink($file); + } + } rrmdir ($directory);