CoreFiles by mySites.guru
fields.php30 lines, 1,030 bytes, from Joomla_3.9.21-Stable-Full_Package.zip
Raw History Compare with 3.9.20
md5
3e4c5513fe02857809e71fd473311f3f
sha1
168becd6431e0bb129801f65d339e9cd262ec6d2
sha256
244a00816c25dc2aeb94d5866bdb184a3a74aefbfa23401d0928af22d800038b
<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_fields
 *
 * @copyright   Copyright (C) 2005 - 2020 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 30 releases, Joomla 3.9.15-rc to 3.10.0-alpha1. See them all, or every version of this file.