- md5
- 440825efe1815057f7c7ef4595bc9306
- sha1
- 89a347f12e590b7f6c94996d93f26a27d7299e07
- sha256
- 33a072ffcf6d7b794bcd6fac309ecd4f3556b660fa3f384d054830a39c9dd602
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
<?php
/**
* @package Joomla.Administrator
* @subpackage com_finder
*
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('_JEXEC') or die;
jimport('joomla.application.component.controller');
/**
* Base controller class for Finder.
*
* @package Joomla.Administrator
* @subpackage com_finder
* @since 2.5
*/
class FinderController extends JController
{
/**
* @var string The default view.
* @since 2.5
*/
protected $default_view = 'index';
/**
* Method to display a view.
*
* @param boolean $cachable If true, the view output will be cached
* @param array $urlparams An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
*
* @return JController A JController object to support chaining.
*
* @since 2.5
*/
public function display($cachable = false, $urlparams = array())
{
include_once JPATH_COMPONENT . '/helpers/finder.php';
// Set the variables.
$input = JFactory::getApplication()->input;
// Load the submenu.
FinderHelper::addSubmenu($input->get('view', 'index', 'word'));
$view = $input->get('view', 'index', 'word');
$layout = $input->get('layout', 'index', 'word');
$id = $input->get('id', null, 'int');
$f_id = $input->get('filter_id', null, 'int');
// Check for edit form.
if ($view == 'filter' && $layout == 'edit' && !$this->checkEditId('com_finder.edit.filter', $f_id))
{
// Somehow the person just went to the form - we don't allow that.
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $f_id));
$this->setMessage($this->getError(), 'error');
$this->setRedirect(JRoute::_('index.php?option=com_finder&view=filters', false));
return false;
}
parent::display();
return $this;
}
}
The same content is in 7 releases, Joomla 2.5.0 to 2.5.6. See them all, or every version of this file.