- md5
- c393a8f94abb9b3c11e2a83889fc9d30
- sha1
- ebce16605d66ff6f6f6d145348862503f222ddcd
- sha256
- b9211f1c7dd821cffecdd539631adf5473839835feceda617ff74c53fb31c46a
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
<?php
/**
* @package Joomla.Site
* @subpackage com_finder
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Finder\Site\Controller;
\defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\Component\Finder\Administrator\Helper\LanguageHelper;
/**
* Finder Component Controller.
*
* @since 2.5
*/
class DisplayController extends BaseController
{
/**
* Method to display a view.
*
* @param boolean $cachable If true, the view output will be cached. [optional]
* @param array $urlparams An array of safe URL parameters and their variable types,
* for valid values see {@link \JFilterInput::clean()}. [optional]
*
* @return static This object is to support chaining.
*
* @since 2.5
*/
public function display($cachable = false, $urlparams = array())
{
$input = Factory::getApplication()->input;
$cachable = true;
// Load plugin language files.
LanguageHelper::loadPluginLanguage();
// Set the default view name and format from the Request.
$viewName = $input->get('view', 'search', 'word');
$input->set('view', $viewName);
// Don't cache view for search queries
if ($input->get('q', null, 'string') || $input->get('f', null, 'int') || $input->get('t', null, 'array'))
{
$cachable = false;
}
$safeurlparams = array(
'f' => 'INT',
'lang' => 'CMD'
);
return parent::display($cachable, $safeurlparams);
}
}
The same content is in 5 releases, Joomla 4.0.0-beta to 4.0.0-beta5. See them all, or every version of this file.