29
0
mirror of https://github.com/joomla/joomla-cms.git synced 2024-07-07 20:43:37 +00:00
cms/components/com_finder/controller.php
javier gomez 423df55279 [Code Style] Changes in tag standards: frontend components. Fixes #4637
[Code Style] Changes in tag standards: frontend com_config

[Code Style] Changes in tag standards: frontend com_contact

[Code Style] Changes in tag standards: frontend com_content

[Code Style] Changes in tag standards: frontend com_finder

[Code Style] Changes in tag standards: frontend com_newsfeeds

[Code Style] Changes in tag standards: frontend com_search

[Code Style] Changes in tag standards: frontend com_tags

[Code Style] Changes in tag standards: frontend com_users

[Code Style] Changes in tag standards: frontend com_weblinks

[Code Style] Changes in tag standards: frontend com_wrapper

[Code Style] Changes in tag standards: frontend com_newsfeed

[Code Style] Changes in tag standards: frontend com_mailto
2014-10-14 23:20:45 +02:00

58 lines
1.5 KiB
PHP

<?php
/**
* @package Joomla.Site
* @subpackage com_finder
*
* @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('_JEXEC') or die;
JLoader::register('FinderHelperLanguage', JPATH_ADMINISTRATOR . '/components/com_finder/helpers/language.php');
/**
* Finder Component Controller.
*
* @since 2.5
*/
class FinderController extends JControllerLegacy
{
/**
* 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 JControllerLegacy This object is to support chaining.
*
* @since 2.5
*/
public function display($cachable = false, $urlparams = array())
{
$input = JFactory::getApplication()->input;
$cachable = true;
// Load plug-in language files.
FinderHelperLanguage::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);
}
}