JoomlaPolska / jezyk-J4

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

[4.3] Guided Tours disabled plugin #386

Closed joomlapl-bot closed 12 months ago

joomlapl-bot commented 1 year ago

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

Click to expand the diff! ```diff diff --git a/administrator/components/com_guidedtours/src/Controller/DisplayController.php b/administrator/components/com_guidedtours/src/Controller/DisplayController.php index 3f83224df59c0..c5ef8a5738126 100644 --- a/administrator/components/com_guidedtours/src/Controller/DisplayController.php +++ b/administrator/components/com_guidedtours/src/Controller/DisplayController.php @@ -12,6 +12,7 @@ use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\Controller\BaseController; +use Joomla\CMS\Plugin\PluginHelper; use Joomla\CMS\Router\Route; // phpcs:disable PSR1.Files.SideEffects @@ -49,6 +50,11 @@ public function display($cachable = false, $urlparams = []) $layout = $this->input->get('layout', 'default'); $id = $this->input->getInt('id'); + // Show messages about the disabled plugin + if ($view === 'tours' && !PluginHelper::isEnabled('system', 'guidedtours')) { + $this->app->enqueueMessage(Text::_('COM_GUIDEDTOURS_PLUGIN_DISABLED'), 'error'); + } + if ($view === 'tour' && $layout === 'edit' && !$this->checkEditId('com_guidedtours.edit.tour', $id)) { $this->setMessage(Text::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id), 'error'); $this->setRedirect(Route::_('index.php?option=com_guidedtours&view=tours', false)); diff --git a/administrator/language/en-GB/com_guidedtours.ini b/administrator/language/en-GB/com_guidedtours.ini index a201bc70e1984..1e8d9cba02e20 100644 --- a/administrator/language/en-GB/com_guidedtours.ini +++ b/administrator/language/en-GB/com_guidedtours.ini @@ -42,6 +42,7 @@ COM_GUIDEDTOURS_N_ITEMS_UNPUBLISHED="%d items unpublished." COM_GUIDEDTOURS_NEW_TOUR="New Tour" COM_GUIDEDTOURS_ORDER_TYPE_ASC="Type ascending" COM_GUIDEDTOURS_ORDER_TYPE_DESC="Type descending" +COM_GUIDEDTOURS_PLUGIN_DISABLED="The Guided Tours System Plugin is disabled. The Guided Tours module will not be displayed if this is not enabled." COM_GUIDEDTOURS_STEP_DESCRIPTION_TRANSLATION="Description (%s)" COM_GUIDEDTOURS_STEP_EDIT_STEP="Edit Step" COM_GUIDEDTOURS_STEP_FILTER_SEARCH_DESC="Search in title and note. Prefix with ID: to search for a step ID or DESCRIPTION: to search in description." ```