diff --git a/administrator/components/com_contact/views/contacts/tmpl/modal.php b/administrator/components/com_contact/views/contacts/tmpl/modal.php index e9a81385e2d3d..1e2f4938e00a8 100644 --- a/administrator/components/com_contact/views/contacts/tmpl/modal.php +++ b/administrator/components/com_contact/views/contacts/tmpl/modal.php @@ -23,6 +23,11 @@ $app = JFactory::getApplication(); +if ($app->isSite()) +{ + JSession::checkToken('get') or die(JText::_('JINVALID_TOKEN')); +} + $function = $app->input->getCmd('function', 'jSelectContact'); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); diff --git a/components/com_contact/contact.php b/components/com_contact/contact.php index a119f16139c3e..599433084bc64 100644 --- a/components/com_contact/contact.php +++ b/components/com_contact/contact.php @@ -10,7 +10,18 @@ defined('_JEXEC') or die; JLoader::register('ContactHelperRoute', JPATH_COMPONENT . '/helpers/route.php'); +$config = array(); -$controller = JControllerLegacy::getInstance('Contact'); -$controller->execute(JFactory::getApplication()->input->get('task')); +$input = JFactory::getApplication()->input; + +if ($input->get('view') === 'contacts' && $input->get('layout') === 'modal') +{ + $config['base_path'] = JPATH_COMPONENT_ADMINISTRATOR; + $lang = JFactory::getLanguage(); + $lang->load('joomla', JPATH_ADMINISTRATOR); + $lang->load('com_contact', JPATH_ADMINISTRATOR); +} + +$controller = JControllerLegacy::getInstance('Contact', $config); +$controller->execute($input->get('task')); $controller->redirect(); diff --git a/components/com_contact/controller.php b/components/com_contact/controller.php index de91f092984e1..ac78e1d432317 100644 --- a/components/com_contact/controller.php +++ b/components/com_contact/controller.php @@ -16,6 +16,29 @@ */ class ContactController extends JControllerLegacy { + /** + * Constructor. + * + * @param array $config An optional associative array of configuration settings. + * Recognized key values include 'name', 'default_task', 'model_path', and + * 'view_path' (this list is not meant to be comprehensive). + * + * @since __DEPLOY_VERSION__ + */ + public function __construct($config = array()) + { + $this->input = JFactory::getApplication()->input; + + // Article frontpage Editor contact proxying: + if ($this->input->get('view') === 'contacts' && $this->input->get('layout') === 'modal') + { + JHtml::_('stylesheet', 'system/adminlist.css', array(), true); + $config['base_path'] = JPATH_COMPONENT_ADMINISTRATOR; + } + + parent::__construct($config); + } + /** * Method to display a view. * diff --git a/components/com_contact/models/forms/filter_contacts.xml b/components/com_contact/models/forms/filter_contacts.xml new file mode 100644 index 0000000000000..6272238fbadd7 --- /dev/null +++ b/components/com_contact/models/forms/filter_contacts.xml @@ -0,0 +1,136 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/components/com_menus/controller.php b/components/com_menus/controller.php new file mode 100644 index 0000000000000..d47993a4be14e --- /dev/null +++ b/components/com_menus/controller.php @@ -0,0 +1,41 @@ +input = JFactory::getApplication()->input; + + // Menu items frontpage Editor Menus proxying: + if ($this->input->get('view') === 'items' && $this->input->get('layout') === 'modal') + { + JHtml::_('stylesheet', 'system/adminlist.css', array(), true); + $config['base_path'] = JPATH_COMPONENT_ADMINISTRATOR; + } + + parent::__construct($config); + } +} diff --git a/components/com_menus/menus.php b/components/com_menus/menus.php new file mode 100644 index 0000000000000..2b6488d956dfd --- /dev/null +++ b/components/com_menus/menus.php @@ -0,0 +1,27 @@ +input->get('view') === 'items' && $app->input->get('layout') === 'modal') +{ + $config['base_path'] = JPATH_COMPONENT_ADMINISTRATOR; + $lang = JFactory::getLanguage(); + $lang->load('joomla', JPATH_ADMINISTRATOR); + $lang->load('com_menus', JPATH_ADMINISTRATOR); +} + +// Trigger the controller +$controller = JControllerLegacy::getInstance('Menus', $config); +$controller->execute($app->input->get('task')); +$controller->redirect(); + diff --git a/components/com_menus/models/forms/filter_items.xml b/components/com_menus/models/forms/filter_items.xml new file mode 100644 index 0000000000000..d9d407a746c3f --- /dev/null +++ b/components/com_menus/models/forms/filter_items.xml @@ -0,0 +1,104 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +