- md5
- 0c4c4af3a928a82e7e54849e2f5fdfb4
- sha1
- d8dcd7bafe36c5aa7ed2726d740baaa1cc396598
- sha256
- 2b354b8eb20fffa7361b5c9fdb90dcc128950fb4dd6b6c82b5dfd3173d72f410
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
<?php
/**
* @package Joomla.Administrator
* @subpackage com_csp
*
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @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-bs-toggle="modal" id="title-' . $httpHeadersId . '"'
);
$this->app->enqueueMessage(Text::sprintf('COM_CSP_PLUGIN_MODAL_DISABLED', $link), 'error');
}
return parent::display();
}
}
No other release has this exact content. See every version of this file.