$this)); ?>
+ redirectPluginId) : ?>
+ redirectPluginId . '&tmpl=component&layout=modal'); ?>
+ redirectPluginId . 'Modal',
+ array(
+ 'url' => $link,
+ 'title' => JText::_('COM_REDIRECT_EDIT_PLUGIN_SETTINGS'),
+ 'height' => '400px',
+ 'modalWidth' => '60',
+ 'footer' => '
'
+ . '
diff --git a/administrator/components/com_redirect/views/links/view.html.php b/administrator/components/com_redirect/views/links/view.html.php
index c2c7683f99e85..e0e224611b699 100644
--- a/administrator/components/com_redirect/views/links/view.html.php
+++ b/administrator/components/com_redirect/views/links/view.html.php
@@ -20,12 +20,18 @@ class RedirectViewLinks extends JViewLegacy
protected $collect_urls_enabled;
+ protected $redirectPluginId = 0;
+
protected $items;
protected $pagination;
protected $state;
+ public $filterForm;
+
+ public $activeFilters;
+
/**
* Display the view.
*
@@ -34,12 +40,14 @@ class RedirectViewLinks extends JViewLegacy
* @return mixed False if unsuccessful, otherwise void.
*
* @since 1.6
+ *
+ * @throws Exception
*/
public function display($tpl = null)
{
// Set variables
$app = JFactory::getApplication();
- $this->enabled = RedirectHelper::isEnabled();
+ $this->enabled = JPluginHelper::isEnabled('system', 'redirect');
$this->collect_urls_enabled = RedirectHelper::collectUrlsEnabled();
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
@@ -56,22 +64,42 @@ public function display($tpl = null)
// Show messages about the enabled plugin and if the plugin should collect URLs
if ($this->enabled && $this->collect_urls_enabled)
{
- $app->enqueueMessage(JText::_('COM_REDIRECT_PLUGIN_ENABLED') . ' ' . JText::_('COM_REDIRECT_COLLECT_URLS_ENABLED'), 'notice');
- }
- elseif ($this->enabled && !$this->collect_urls_enabled)
- {
- $link = JRoute::_('index.php?option=com_plugins&task=plugin.edit&extension_id=' . RedirectHelper::getRedirectPluginId());
- $app->enqueueMessage(JText::_('COM_REDIRECT_PLUGIN_ENABLED') . JText::sprintf('COM_REDIRECT_COLLECT_URLS_DISABLED', $link), 'notice');
+ $app->enqueueMessage(JText::sprintf('COM_REDIRECT_COLLECT_URLS_ENABLED', JText::_('COM_REDIRECT_PLUGIN_ENABLED')), 'notice');
}
else
{
- $link = JRoute::_('index.php?option=com_plugins&task=plugin.edit&extension_id=' . RedirectHelper::getRedirectPluginId());
- $app->enqueueMessage(JText::sprintf('COM_REDIRECT_PLUGIN_DISABLED', $link), 'error');
+ $this->redirectPluginId = RedirectHelper::getRedirectPluginId();
+
+ $link = JHtml::_(
+ 'link',
+ '#plugin' . $this->redirectPluginId . 'Modal',
+ JText::_('COM_REDIRECT_SYSTEM_PLUGIN'),
+ 'class="alert-link" data-toggle="modal" id="title-' . $this->redirectPluginId . '"'
+ );
+
+ // To be removed in Joomla 4
+ if (JFactory::getApplication()->getTemplate() === 'hathor')
+ {
+ $link = JHtml::_(
+ 'link',
+ JRoute::_('index.php?option=com_plugins&task=plugin.edit&extension_id=' . RedirectHelper::getRedirectPluginId()),
+ JText::_('COM_REDIRECT_SYSTEM_PLUGIN')
+ );
+ }
+
+ if ($this->enabled && !$this->collect_urls_enabled)
+ {
+ $app->enqueueMessage(JText::sprintf('COM_REDIRECT_COLLECT_MODAL_URLS_DISABLED', JText::_('COM_REDIRECT_PLUGIN_ENABLED'), $link), 'notice');
+ }
+ else
+ {
+ $app->enqueueMessage(JText::sprintf('COM_REDIRECT_PLUGIN_MODAL_DISABLED', $link), 'error');
+ }
}
$this->addToolbar();
- parent::display($tpl);
+ return parent::display($tpl);
}
/**
@@ -129,6 +157,8 @@ protected function addToolbar()
$title = JText::_('JTOOLBAR_BULK_IMPORT');
+ JHtml::_('bootstrap.modal', 'collapseModal');
+
// Instantiate a new JLayoutFile instance and render the batch button
$layout = new JLayoutFile('toolbar.batch');
@@ -155,6 +185,5 @@ protected function addToolbar()
}
JToolbarHelper::help('JHELP_COMPONENTS_REDIRECT_MANAGER');
-
}
}
diff --git a/administrator/language/en-GB/en-GB.com_redirect.ini b/administrator/language/en-GB/en-GB.com_redirect.ini
index 12c65d407132e..822ada2b49a83 100644
--- a/administrator/language/en-GB/en-GB.com_redirect.ini
+++ b/administrator/language/en-GB/en-GB.com_redirect.ini
@@ -10,11 +10,14 @@ COM_REDIRECT_BATCH_TIP="Enter expired URL (mandatory) with a new URL (optional)
COM_REDIRECT_BUTTON_UPDATE_LINKS="Update Links"
COM_REDIRECT_CLEAR_FAIL="Failed to delete unpublished links."
COM_REDIRECT_CLEAR_SUCCESS="All unpublished links have been deleted."
-COM_REDIRECT_COLLECT_URLS_ENABLED="The option 'Collect URLs' is enabled."
+COM_REDIRECT_COLLECT_MODAL_URLS_DISABLED="%1$s The 'Collect URLs' option in the %2$s is disabled. Error page URLs will not be collected by this component."
+COM_REDIRECT_COLLECT_URLS_ENABLED="%1$s The option 'Collect URLs' is enabled."
+; The following string is deprecated and will be removed with 4.0.
COM_REDIRECT_COLLECT_URLS_DISABLED="The 'Collect URLs' option in the
Redirect System Plugin is disabled. Error page URLs will not be collected by this component."
COM_REDIRECT_CONFIGURATION="Redirect: Options"
COM_REDIRECT_DISABLE_LINK="Disable Link"
COM_REDIRECT_EDIT_LINK="Edit Link #%d"
+COM_REDIRECT_EDIT_PLUGIN_SETTINGS="Edit Plugin Settings"
COM_REDIRECT_ENABLE_LINK="Enable Link"
COM_REDIRECT_ERROR_DESTINATION_URL_REQUIRED="The redirect must have a destination URL"
COM_REDIRECT_ERROR_DUPLICATE_OLD_URL="The source URL must be unique."
@@ -79,11 +82,14 @@ COM_REDIRECT_N_LINKS_UPDATED_1="1 link has been updated."
COM_REDIRECT_NEW_LINK="New Link"
COM_REDIRECT_NO_ITEM_ADDED="No links added."
COM_REDIRECT_NO_ITEM_SELECTED="No links selected."
+; The following string is deprecated and will be removed with 4.0.
COM_REDIRECT_PLUGIN_DISABLED="The
Redirect System Plugin is disabled. It needs to be enabled for this component to work."
COM_REDIRECT_PLUGIN_ENABLED="The Redirect Plugin is enabled."
+COM_REDIRECT_PLUGIN_MODAL_DISABLED="The %s is disabled. It needs to be enabled for this component to work."
COM_REDIRECT_REDIRECTED_ON="Redirected on: %s."
COM_REDIRECT_SAVE_SUCCESS="Link saved."
COM_REDIRECT_SEARCH_LINKS="Search in link fields."
+COM_REDIRECT_SYSTEM_PLUGIN="Redirect System Plugin"
COM_REDIRECT_TOOLBAR_PURGE="Purge Unpublished"
COM_REDIRECT_XML_DESCRIPTION="This component implements link redirection."
JLIB_RULES_SETTING_NOTES="Changes apply to this component only.
Inherited - a Global Configuration setting or higher level setting is applied.
Denied always wins - whatever is set at the Global or higher level and applies to all child elements.
Allowed will enable the action for this component unless it is overruled by a Global Configuration setting."
diff --git a/administrator/templates/hathor/html/com_redirect/links/default.php b/administrator/templates/hathor/html/com_redirect/links/default.php
index 2ed99612f07f3..adb9d82720a01 100644
--- a/administrator/templates/hathor/html/com_redirect/links/default.php
+++ b/administrator/templates/hathor/html/com_redirect/links/default.php
@@ -140,15 +140,18 @@
pagination->getListFooter(); ?>
diff --git a/libraries/src/Joomla/CMS/Plugin/PluginHelper.php b/libraries/src/Joomla/CMS/Plugin/PluginHelper.php
index 0f5227187e71b..10f348dc3b30c 100644
--- a/libraries/src/Joomla/CMS/Plugin/PluginHelper.php
+++ b/libraries/src/Joomla/CMS/Plugin/PluginHelper.php
@@ -316,7 +316,22 @@ protected static function load()
{
$db = \JFactory::getDbo();
$query = $db->getQuery(true)
- ->select(array($db->quoteName('folder', 'type'), $db->quoteName('element', 'name'), $db->quoteName('params')))
+ ->select(
+ $db->quoteName(
+ array(
+ 'folder',
+ 'element',
+ 'params',
+ 'extension_id'
+ ),
+ array(
+ 'type',
+ 'name',
+ 'params',
+ 'id'
+ )
+ )
+ )
->from('#__extensions')
->where('enabled = 1')
->where('type = ' . $db->quote('plugin'))