CoreFiles by mySites.guru
fields.php30 lines, 948 bytes, from Joomla_3.9.26-Stable-Full_Package.zip
Raw History Compare with 3.9.25
md5
640910b8a4df727ea9f3f0649f2204f8
sha1
2d57ce4c1a56eb8974c44569e9c354269dbbf257
sha256
6ef5363faa53d4471b7cde950fa03934ad3b16c7bb140608215708de4613ae02
<?php
/**
 * @package     Joomla.Administrator
 * @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');

$app       = JFactory::getApplication();
$context   = $app->getUserStateFromRequest(
	'com_fields.groups.context',
	'context',
	$app->getUserStateFromRequest('com_fields.fields.context', 'context', 'com_content.article', 'CMD'),
	'CMD'
);

$parts = FieldsHelper::extract($context);

if (!$parts || !JFactory::getUser()->authorise('core.manage', $parts[0]))
{
	throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403);
}

$controller = JControllerLegacy::getInstance('Fields');
$controller->execute($app->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.