diff --git a/modules/system/classes/PluginManager.php b/modules/system/classes/PluginManager.php
index 30b91b9f4..0932a5a43 100644
--- a/modules/system/classes/PluginManager.php
+++ b/modules/system/classes/PluginManager.php
@@ -655,7 +655,9 @@ class PluginManager
/**
* Scans the system plugins to locate any dependencies that are not currently
- * installed. Returns an array of plugin codes that are needed.
+ * installed. Returns an array of missing plugin codes keyed by the plugin that requires them.
+ *
+ * ['Author.Plugin' => ['Required.Plugin1', 'Required.Plugin2']
*
* PluginManager::instance()->findMissingDependencies();
*
@@ -676,7 +678,7 @@ class PluginManager
}
if (!in_array($require, $missing)) {
- $missing[] = $require;
+ $missing[$this->getIdentifier($plugin)][] = $require;
}
}
}
diff --git a/modules/system/controllers/Updates.php b/modules/system/controllers/Updates.php
index bbf461aad..ed66175d5 100644
--- a/modules/system/controllers/Updates.php
+++ b/modules/system/controllers/Updates.php
@@ -65,6 +65,8 @@ class Updates extends Controller
if ($this->getAjaxHandler() == 'onExecuteStep') {
$this->useSecurityToken = false;
}
+
+ $this->vars['warnings'] = $this->getWarnings();
}
/**
@@ -227,6 +229,23 @@ class Updates extends Controller
return $contents;
}
+ protected function getWarnings()
+ {
+ $warnings = [];
+ $missingDependencies = PluginManager::instance()->findMissingDependencies();
+
+ foreach ($missingDependencies as $pluginCode => $plugin) {
+ foreach ($plugin as $missingPluginCode) {
+ $warnings[] = Lang::get('system::lang.updates.update_warnings_plugin_missing', [
+ 'code' => '' . $missingPluginCode . '',
+ 'parent_code' => '' . $pluginCode . ''
+ ]);
+ }
+ }
+
+ return $warnings;
+ }
+
/**
* Override for ListController behavior.
* Modifies the CSS class for each row in the list to
diff --git a/modules/system/controllers/updates/index.htm b/modules/system/controllers/updates/index.htm
index 39c997d39..f59abe07c 100644
--- a/modules/system/controllers/updates/index.htm
+++ b/modules/system/controllers/updates/index.htm
@@ -47,5 +47,18 @@
-
+
+
+
= $this->listRender() ?>
diff --git a/modules/system/lang/en/lang.php b/modules/system/lang/en/lang.php
index 6c57d9e68..fa55cb114 100644
--- a/modules/system/lang/en/lang.php
+++ b/modules/system/lang/en/lang.php
@@ -331,6 +331,8 @@ return [
'core_downloading' => 'Downloading application files',
'core_extracting' => 'Unpacking application files',
'core_set_build' => 'Setting build number',
+ 'update_warnings_title' => 'Some issues have been detected and require attention:',
+ 'update_warnings_plugin_missing' => 'The :parent_code plugin requires :code to be installed before it will work',
'changelog' => 'Changelog',
'changelog_view_details' => 'View details',
'plugins' => 'Plugins',
diff --git a/modules/system/lang/ru/lang.php b/modules/system/lang/ru/lang.php
index 042aefbcd..3d6fffa89 100644
--- a/modules/system/lang/ru/lang.php
+++ b/modules/system/lang/ru/lang.php
@@ -265,46 +265,48 @@ return [
'install_success' => 'Плагин был успешно установлен.',
],
'updates' => [
- 'title' => 'Менеджер обновлений',
- 'name' => 'Обновление ПО',
- 'menu_label' => 'Обновления и плагины',
- 'menu_description' => 'Обновление системы, управление и установка плагинов и тем.',
- 'return_link' => 'Вернуться к системе обновлений',
- 'check_label' => 'Проверить обновления ',
- 'retry_label' => 'Попробовать еще раз',
- 'plugin_name' => 'Название',
- 'plugin_code' => 'Код',
- 'plugin_description' => 'Описание',
- 'plugin_version' => 'Версия',
- 'plugin_author' => 'Автор',
- 'plugin_not_found' => 'Плагин не найден',
- 'plugin_version_not_found' => 'Версия плагина не найдена',
- 'core_current_build' => 'Текущая сборка',
- 'core_view_changelog' => 'Просмотр списка изменений',
- 'core_build' => 'Сборка :build',
- 'core_build_help' => 'Последняя доступная сборка.',
- 'core_downloading' => 'Загрузка файлов приложения',
- 'core_extracting' => 'Распаковка файлов приложения',
- 'core_set_build' => 'Установка номера сборки',
- 'changelog' => 'Список изменений',
- 'changelog_view_details' => 'Просмотр подробностей',
- 'plugins' => 'Плагины',
- 'themes' => 'Темы',
- 'disabled' => 'Отключено',
- 'plugin_downloading' => 'Загрузка плагина: :name',
- 'plugin_extracting' => 'Распаковка плагина: :name',
- 'plugin_version_none' => 'Новый плагин',
- 'plugin_current_version' => 'Текущая версия',
- 'theme_new_install' => 'Новая тема установлена.',
- 'theme_downloading' => 'Загрузка темы: :name',
- 'theme_extracting' => 'Распаковка темы: :name',
- 'update_label' => 'Обновить',
- 'update_completing' => 'Завершение процесса обновления',
- 'update_loading' => 'Поиск доступных обновлений...',
- 'update_success' => 'Процесс обновления был успешно завершен.',
- 'update_failed_label' => 'Не удалось выполнить обновление',
- 'force_label' => 'Принудительно обновить',
- 'found' => [
+ 'title' => 'Менеджер обновлений',
+ 'name' => 'Обновление ПО',
+ 'menu_label' => 'Обновления и плагины',
+ 'menu_description' => 'Обновление системы, управление и установка плагинов и тем.',
+ 'return_link' => 'Вернуться к системе обновлений',
+ 'check_label' => 'Проверить обновления ',
+ 'retry_label' => 'Попробовать еще раз',
+ 'plugin_name' => 'Название',
+ 'plugin_code' => 'Код',
+ 'plugin_description' => 'Описание',
+ 'plugin_version' => 'Версия',
+ 'plugin_author' => 'Автор',
+ 'plugin_not_found' => 'Плагин не найден',
+ 'plugin_version_not_found' => 'Версия плагина не найдена',
+ 'core_current_build' => 'Текущая сборка',
+ 'core_view_changelog' => 'Просмотр списка изменений',
+ 'core_build' => 'Сборка :build',
+ 'core_build_help' => 'Последняя доступная сборка.',
+ 'core_downloading' => 'Загрузка файлов приложения',
+ 'core_extracting' => 'Распаковка файлов приложения',
+ 'core_set_build' => 'Установка номера сборки',
+ 'update_warnings_title' => 'Обнаружены проблемы требующие вашего внимания',
+ 'update_warnings_plugin_missing' => 'Плагин :code ялвяется зависисмостью плагина :parent_code, но он не обнаружен в системе. Пожалуйста установите этот плагин.',
+ 'changelog' => 'Список изменений',
+ 'changelog_view_details' => 'Просмотр подробностей',
+ 'plugins' => 'Плагины',
+ 'themes' => 'Темы',
+ 'disabled' => 'Отключено',
+ 'plugin_downloading' => 'Загрузка плагина: :name',
+ 'plugin_extracting' => 'Распаковка плагина: :name',
+ 'plugin_version_none' => 'Новый плагин',
+ 'plugin_current_version' => 'Текущая версия',
+ 'theme_new_install' => 'Новая тема установлена.',
+ 'theme_downloading' => 'Загрузка темы: :name',
+ 'theme_extracting' => 'Распаковка темы: :name',
+ 'update_label' => 'Обновить',
+ 'update_completing' => 'Завершение процесса обновления',
+ 'update_loading' => 'Поиск доступных обновлений...',
+ 'update_success' => 'Процесс обновления был успешно завершен.',
+ 'update_failed_label' => 'Не удалось выполнить обновление',
+ 'force_label' => 'Принудительно обновить',
+ 'found' => [
'label' => 'Доступны новые обновления!',
'help' => 'Выберите «Обновить», чтобы начать процесс обновления.',
],
diff --git a/modules/system/reportwidgets/Status.php b/modules/system/reportwidgets/Status.php
index 38810d561..f09442fd2 100644
--- a/modules/system/reportwidgets/Status.php
+++ b/modules/system/reportwidgets/Status.php
@@ -81,7 +81,7 @@ class Status extends ReportWidgetBase
{
$warnings = [];
- $missingPlugins = PluginManager::instance()->findMissingDependencies();
+ $missingDependencies = PluginManager::instance()->findMissingDependencies();
$writablePaths = [
temp_path(),
@@ -127,8 +127,13 @@ class Status extends ReportWidgetBase
}
}
- foreach ($missingPlugins as $pluginCode) {
- $warnings[] = Lang::get('backend::lang.warnings.plugin_missing', ['name' => ''.$pluginCode.'']);
+ foreach ($missingDependencies as $pluginCode => $plugin) {
+ foreach ($plugin as $missingPluginCode) {
+ $warnings[] = Lang::get('system::lang.updates.update_warnings_plugin_missing', [
+ 'code' => '' . $missingPluginCode . '',
+ 'parent_code' => '' . $pluginCode . ''
+ ]);
+ }
}
return $warnings;