CoreFiles by mySites.guru
DisplayController.php47 lines, 1,214 bytes, from Joomla_4.1.0-Stable-Full_Package.zip
Raw History Compare with 4.0.6
md5
aa4e2d85a7df821b35acb36706019eaa
sha1
5c7c0b0235f6534f66c18178e1d80fda215562e8
sha256
0c6fade07da0dab0cdc25b51f552a00fbe0c56671ede94895a659b950303c57f
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_admin
 *
 * @copyright   (C) 2008 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Component\Admin\Administrator\Controller;

\defined('_JEXEC') or die;

use Joomla\CMS\MVC\Controller\BaseController;

/**
 * Admin Controller
 *
 * @since  1.6
 */
class DisplayController extends BaseController
{
	/**
	 * View method
	 *
	 * @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  static  Supports chaining.
	 *
	 * @since   3.9
	 */
	public function display($cachable = false, $urlparams = array())
	{
		$viewName = $this->input->get('view', $this->default_view);
		$format   = $this->input->get('format', 'html');

		// Check CSRF token for sysinfo export views
		if ($viewName === 'sysinfo' && ($format === 'text' || $format === 'json'))
		{
			// Check for request forgeries.
			$this->checkToken('GET');
		}

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

The same content is in 48 releases, Joomla 4.0.0-rc2 to 4.2.0-beta2. See them all, or every version of this file.