- md5
- 3abd5f922b416401d9a329f8bda3868f
- sha1
- cc03656f338f406f4a23405ec5547c49c85e5501
- sha256
- af9cd226328b7daf92dc8eb12d4b330387420422d4ce66936b708910f7683e94
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
<?php
/**
* @package Joomla.Administrator
* @subpackage com_csp
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Csp\Administrator\Controller;
defined('_JEXEC') or die;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\Component\Csp\Administrator\Helper\ReporterHelper;
/**
* Csp display controller.
*
* @since 4.0.0
*/
class DisplayController extends BaseController
{
/**
* The default view.
*
* @var string
* @since 4.0.0
*/
protected $default_view = 'reports';
/**
* Method to display a view.
*
* @param boolean $cachable If true, the view output will be cached.
* @param mixed $urlparams An array of safe URL parameters and their variable types, for valid values see {@link \JFilterInput::clean()}.
*
* @return static This object to support chaining.
*
* @since 4.0.0
*/
public function display($cachable = false, $urlparams = false)
{
// Show messages about the plugin when it is disabled
if (!PluginHelper::isEnabled('system', 'httpheaders'))
{
$httpHeadersId = ReporterHelper::getHttpHeadersPluginId();
$link = HTMLHelper::_(
'link',
'#plugin' . $httpHeadersId . 'Modal',
Text::_('COM_CSP_SYSTEM_PLUGIN'),
'class="alert-link" data-toggle="modal" id="title-' . $httpHeadersId . '"'
);
$this->app->enqueueMessage(Text::sprintf('COM_CSP_PLUGIN_MODAL_DISABLED', $link), 'error');
}
parent::display();
}
}
The same content is in 2 releases, Joomla 4.0.0-alpha5 to 4.0.0-alpha6. See them all, or every version of this file.