CoreFiles by mySites.guru
controller.php43 lines, 1,189 bytes, from Joomla_3.9.1-Stable-Full_Package.zip
Raw History Compare with 3.9.0
md5
7b7b7c9f8fa8a042f91eb3102e65468b
sha1
8a330ff59b40d8650f8b47a642b595ee6c986993
sha256
a8caf42c15ede44faf69d368b3ca0d243e8761a507bfd8536f8bd4c8d93587d1
<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_fields
 *
 * @copyright   Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;

/**
 * Base controller class for Fields Component.
 *
 * @since  3.7.0
 */
class FieldsController 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   3.7.0
	 */
	public function __construct($config = array())
	{
		$this->input = JFactory::getApplication()->input;

		// Frontpage Editor Fields Button proxying:
		if ($this->input->get('view') === 'fields' && $this->input->get('layout') === 'modal')
		{
			// Load the backend language file.
			$lang = JFactory::getLanguage();
			$lang->load('com_fields', JPATH_ADMINISTRATOR);

			$config['base_path'] = JPATH_COMPONENT_ADMINISTRATOR;
		}

		parent::__construct($config);
	}
}

The same content is in 29 releases, Joomla 3.8.4-rc to 3.9.1. See them all, or every version of this file.