CoreFiles by mySites.guru
DisplayController.php49 lines, 1,512 bytes, from Joomla_4.2.0-beta3-Beta-Full_Package.zip
Raw History Compare with 4.2.0-beta2
md5
9487c34dffb44b4c8e27a595185dc0d3
sha1
3b5513b01f0d29b475fb64564788434d5539f2c5
sha256
fe0fad99a86801fe5b0da6980616c441d00c1d07a8bc0dae74f5157013660470
<?php

/**
 * @package     Joomla.Site
 * @subpackage  com_newsfeeds
 *
 * @copyright   (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Component\Newsfeeds\Site\Controller;

use Joomla\CMS\MVC\Controller\BaseController;

/**
 * Newsfeeds Component Controller
 *
 * @since  1.5
 */
class DisplayController extends BaseController
{
    /**
     * Method to show a newsfeeds 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  static  This object to support chaining.
     *
     * @since   1.5
     */
    public function display($cachable = false, $urlparams = false)
    {
        $cachable = true;

        // Set the default view name and format from the Request.
        $vName = $this->input->get('view', 'categories');
        $this->input->set('view', $vName);

        if ($this->app->getIdentity()->get('id') || ($this->input->getMethod() === 'POST' && $vName === 'category' )) {
            $cachable = false;
        }

        $safeurlparams = array('id' => 'INT', 'limit' => 'UINT', 'limitstart' => 'UINT',
                                'filter_order' => 'CMD', 'filter_order_Dir' => 'CMD', 'lang' => 'CMD');

        return parent::display($cachable, $safeurlparams);
    }
}

The same content is in 5 releases, Joomla 4.2.0-beta3 to 4.2.1-rc2. See them all, or every version of this file.