JoomlaPolska / jezyk-J4

Język polski dla Joomla 4
GNU General Public License v2.0
3 stars 5 forks source link

[[5.x]Compatibility Plugin (BC) added to system info #380

Closed joomlapl-bot closed 7 months ago

joomlapl-bot commented 1 year ago

PR w związku ze zmianą oryginału https://github.com/joomla/joomla-cms/pull/41209 Poniżej zmiany w oryginale:

Click to expand the diff! ```diff diff --git a/administrator/components/com_admin/src/Model/SysinfoModel.php b/administrator/components/com_admin/src/Model/SysinfoModel.php index d9c003651419a..580468afc950a 100644 --- a/administrator/components/com_admin/src/Model/SysinfoModel.php +++ b/administrator/components/com_admin/src/Model/SysinfoModel.php @@ -11,12 +11,15 @@ namespace Joomla\Component\Admin\Administrator\Model; use Joomla\CMS\Component\ComponentHelper; +use Joomla\CMS\Extension\ExtensionHelper; use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; use Joomla\CMS\Log\Log; use Joomla\CMS\MVC\Model\BaseDatabaseModel; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\CMS\Version; use Joomla\Registry\Registry; +use Joomla\Utilities\ArrayHelper; // phpcs:disable PSR1.Files.SideEffects \defined('_JEXEC') or die; @@ -321,12 +324,27 @@ public function &getInfo(): array 'server' => $_SERVER['SERVER_SOFTWARE'] ?? getenv('SERVER_SOFTWARE'), 'sapi_name' => PHP_SAPI, 'version' => (new Version())->getLongVersion(), + 'compatpluginenabled' => PluginHelper::isEnabled('system', 'compat'), + 'compatpluginparameters' => $this->getCompatPluginParameters(), 'useragent' => $_SERVER['HTTP_USER_AGENT'] ?? '', ]; return $this->info; } + private function getCompatPluginParameters() + { + $record = ExtensionHelper::getExtensionRecord('compat', 'plugin', 0, 'system'); + + if ($record) { + $params = new Registry($record->params); + + return ArrayHelper::toString($params->toArray(), ':', ', '); + } + + return ''; + } + /** * Check if the phpinfo function is enabled * diff --git a/administrator/components/com_admin/tmpl/sysinfo/default_system.php b/administrator/components/com_admin/tmpl/sysinfo/default_system.php index 0891b5c2ef82b..06e1bdb41f60a 100644 --- a/administrator/components/com_admin/tmpl/sysinfo/default_system.php +++ b/administrator/components/com_admin/tmpl/sysinfo/default_system.php @@ -120,6 +120,14 @@ info['version']; ?> + + + + + + info['compatpluginenabled'] ? Text::_('JENABLED') . ' (' . $this->info['compatpluginparameters'] . ')' : Text::_('JDISABLED'); ?> + + diff --git a/administrator/language/en-GB/com_admin.ini b/administrator/language/en-GB/com_admin.ini index 58ee08cbc6466..6e8ee97c479a0 100644 --- a/administrator/language/en-GB/com_admin.ini +++ b/administrator/language/en-GB/com_admin.ini @@ -149,6 +149,7 @@ COM_ADMIN_HELP_USERS:_GROUPS="Users: Groups" COM_ADMIN_HELP_USERS:_NEW_OR_EDIT_GROUP="Users: Groups - New/Edit" COM_ADMIN_HELP_USERS:_VIEWING_ACCESS_LEVELS="Users: Access Levels" COM_ADMIN_HELP_USERS="Users" +COM_ADMIN_JOOMLA_COMPAT_PLUGIN="Joomla Backward Compatibility Plugin" COM_ADMIN_JOOMLA_VERSION="Joomla! Version" COM_ADMIN_LICENSE="License" COM_ADMIN_LOG_DIRECTORY="(Log folder)" ```