CoreFiles by mySites.guru
DisplayController.php50 lines, 1,422 bytes, from Joomla_5.2.6-Stable-Full_Package.zip
Raw History Compare with 5.2.5
md5
d2816a96e05804efe59c18aa7cd8b5d5
sha1
d4fc1ed354dd8f4e3d2ae670e8ffe11d4792b0af
sha256
595cb6a0848328888378a757cdc6fc3675216f3b7c61ba2eefe320dcad95b781
<?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;

use Joomla\CMS\MVC\Controller\BaseController;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * 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.
     *                   @see        \Joomla\CMS\Filter\InputFilter::clean() for valid values.
     *
     * @return  static  Supports chaining.
     *
     * @since   3.9
     */
    public function display($cachable = false, $urlparams = [])
    {
        $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 152 releases, Joomla 5.0.0-alpha4 to 6.2.1-rc1. See them all, or every version of this file.