Joomla! PHP Cross Reference Web Portals

Source: /administrator/components/com_finder/controller.php - 60 lines - 1689 bytes - Summary - Text - Print

   1  <?php
   2  /**
   3   * @package     Joomla.Administrator
   4   * @subpackage  com_finder
   5   *
   6   * @copyright   Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
   7   * @license     GNU General Public License version 2 or later; see LICENSE
   8   */
   9  
  10  defined('_JEXEC') or die;
  11  
  12  /**
  13   * Base controller class for Finder.
  14   *
  15   * @package     Joomla.Administrator
  16   * @subpackage  com_finder
  17   * @since       2.5
  18   */
  19  class FinderController extends JControllerLegacy
  20  {
  21      /**
  22       * @var    string  The default view.
  23       * @since  2.5
  24       */
  25      protected $default_view = 'index';
  26  
  27      /**
  28       * Method to display a view.
  29       *
  30       * @param   boolean  $cachable   If true, the view output will be cached
  31       * @param   array    $urlparams  An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  32       *
  33       * @return    JController  A JController object to support chaining.
  34       *
  35       * @since    2.5
  36       */
  37  	public function display($cachable = false, $urlparams = array())
  38      {
  39          include_once  JPATH_COMPONENT . '/helpers/finder.php';
  40  
  41          $view   = $this->input->get('view', 'index', 'word');
  42          $layout = $this->input->get('layout', 'index', 'word');
  43          $f_id   = $this->input->get('filter_id', null, 'int');
  44  
  45          // Check for edit form.
  46          if ($view == 'filter' && $layout == 'edit' && !$this->checkEditId('com_finder.edit.filter', $f_id))
  47          {
  48              // Somehow the person just went to the form - we don't allow that.
  49              $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $f_id));
  50              $this->setMessage($this->getError(), 'error');
  51              $this->setRedirect(JRoute::_('index.php?option=com_finder&view=filters', false));
  52  
  53              return false;
  54          }
  55  
  56          parent::display();
  57  
  58          return $this;
  59      }
  60  }

title

Description

title

Description

title

Description

title

title

Body