CoreFiles by mySites.guru
controller.php38 lines, 742 bytes, from Joomla_3.8.3-Stable-Full_Package.zip
Raw History Compare with 3.8.2
md5
a4a29fea6a06558292dea498278ad6e5
sha1
4049f2c7024c052bf5fb30aa66b90c5b15dd3d06
sha256
0ecc828899333c9e54c8321430f0b624066fb57952f8786f0ca1c1555398d58b
<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_banners
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Banners Controller
 *
 * @since  1.5
 */
class BannersController extends JControllerLegacy
{
	/**
	 * Method when a banner is clicked on.
	 *
	 * @return  void
	 *
	 * @since   1.5
	 */
	public function click()
	{
		$id = $this->input->getInt('id', 0);

		if ($id)
		{
			$model = $this->getModel('Banner', 'BannersModel', array('ignore_request' => true));
			$model->setState('banner.id', $id);
			$model->click();
			$this->setRedirect($model->getUrl());
		}
	}
}

The same content is in 34 releases, Joomla 3.7.0-alpha2 to 3.8.3. See them all, or every version of this file.