CoreFiles by mySites.guru
controller.php38 lines, 729 bytes, from Joomla_3.10.0-alpha2-Alpha-Full_Package.zip
Raw History Compare with 3.10.0-alpha1
md5
7afd598317db12c07f6da15bfacbd229
sha1
f35f558facdd3c45ac6de05e1c7e92adc47141ec
sha256
e38ab78a94ea0702dc750762a292dcdfbf9e86af7f9884719f3c8d6a3557ae13
<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_banners
 *
 * @copyright   (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
 * @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 25 releases, Joomla 3.10.0-alpha2 to 3.10.12. See them all, or every version of this file.