CoreFiles by mySites.guru
fields.php30 lines, 1,030 bytes, from Joomla_3.9.14-Stable-Full_Package.zip
Raw History Compare with 3.9.13
md5
5687d5596371795b06abc40ed200e7f7
sha1
4b1e725994a2d759c9d42dd588311904970d7d71
sha256
faabb834339b418419d88fabfae67cc2807314222ea9b4130faed33f6407c923
<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_fields
 *
 * @copyright   Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;

JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php');

$input   = JFactory::getApplication()->input;
$context = JFactory::getApplication()->getUserStateFromRequest('com_fields.fields.context', 'context', 'com_content.article', 'CMD');
$parts   = FieldsHelper::extract($context);

if ($input->get('view') === 'fields' && $input->get('layout') === 'modal')
{
	if (!JFactory::getUser()->authorise('core.create', $parts[0])
		|| !JFactory::getUser()->authorise('core.edit', $parts[0]))
	{
		JFactory::getApplication()->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'error');

		return;
	}
}

$controller = JControllerLegacy::getInstance('Fields');
$controller->execute($input->get('task'));
$controller->redirect();

The same content is in 26 releases, Joomla 3.9.2-rc to 3.9.14. See them all, or every version of this file.