CoreFiles by mySites.guru
field.php49 lines, 1,143 bytes, from Joomla_3.7.3-Stable-Full_Package.zip
Raw History Compare with 3.7.2
md5
7fd919eaa892615f6cbecd670380e962
sha1
1fa0e4a28a7211aa04a9defdad74a5ec19a00487
sha256
c02f71073a907dd9a13650d0b73f78c0f75f5cf575f3aacd70bdc0ee266a6b80
<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_fields
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;

/**
 * Fields controller class for Fields Component.
 *
 * @since  3.7.0
 */
class FieldsControllerField extends JControllerLegacy
{
	/**
	 * Stores the form content into the user session.
	 *
	 * @return  void
	 *
	 * @since   3.7.0
	 */
	public function storeform()
	{
		JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));

		$app   = JFactory::getApplication();
		$data  = $this->input->get($this->input->get('formcontrol', 'jform'), array(), 'array');
		$parts = FieldsHelper::extract($this->input->getCmd('context'));

		if ($parts)
		{
			$app->setUserState($parts[0] . '.edit.' . $parts[1] . '.data', $data);
		}

		$redirectUrl = base64_decode($this->input->get->getBase64('return'));

		// Don't redirect to an external URL.
		If (!JUri::isInternal($redirectUrl))
		{
			$redirectUrl = 'index.php';
		}

		$app->redirect($redirectUrl);
		$app->close();
	}
}

The same content is in 9 releases, Joomla 3.7.0 to 3.7.3. See them all, or every version of this file.