CoreFiles by mySites.guru
controller.php49 lines, 1,316 bytes, from Joomla_3.9.0-rc-Release_Candidate-Full_Package.zip
Raw History Compare with 3.8.12-rc
md5
08c0e7ea717f4006aca4516233382720
sha1
b37d7c9131ac1d024d9ac5bbb64078234870a409
sha256
5b8d18513d2e69035b57269608cdccc8ad03eaacf28010afc5ac930908a57e27
<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_privacy
 *
 * @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;

/**
 * Privacy Controller
 *
 * @since  3.9.0
 */
class PrivacyController extends JControllerLegacy
{
	/**
	 * Method to display a view.
	 *
	 * @param   boolean  $cachable   If true, the view output will be cached
	 * @param   array    $urlparams  An array of safe URL parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
	 *
	 * @return  $this
	 *
	 * @since   3.9.0
	 */
	public function display($cachable = false, $urlparams = array())
	{
		$view = $this->input->get('view', $this->default_view);

		// Submitting information requests through the frontend is restricted to authenticated users at this time
		if ($view === 'request' && JFactory::getUser()->guest)
		{
			$this->setRedirect(JRoute::_('index.php?option=com_users&view=login', false));

			return $this;
		}

		// Make sure we don't send a referer
		if (in_array($view, array('confirm', 'remind')))
		{
			JFactory::getApplication()->setHeader('Referrer-Policy', 'no-referrer', true);
		}

		return parent::display($cachable, $urlparams);
	}
}

The same content is in 5 releases, Joomla 3.9.0-beta to 3.9.0-rc. See them all, or every version of this file.