CoreFiles by mySites.guru
download.php74 lines, 1,893 bytes, from Joomla_1.7.4-Stable-Full_Package.zip
Raw History Compare with 1.7.3
md5
2f0ac40d4d2ca23d21be3fffdd523524
sha1
612abf9a4397dad809fa8dbf8c254e32c900b46d
sha256
7249f2fb90fec6416a3ee669bb14a5dd3af9f205b4835647ac8bb1b8d56e31cf
<?php
/**
 * @version		$Id: download.php 22338 2011-11-04 17:24:53Z github_bot $
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// No direct access.
defined('_JEXEC') or die;

jimport('joomla.application.component.modelform');

/**
 * Download model.
 *
 * @package		Joomla.Administrator
 * @subpackage	com_banners
 * @since		1.5
 */
class BannersModelDownload extends JModelForm
{
	protected $_context = 'com_banners.tracks';

	/**
	 * Method to auto-populate the model state.
	 *
	 * Note. Calling getState in this method will result in recursion.
	 *
	 * @since	1.6
	 */
	protected function populateState()
	{
		jimport('joomla.utilities.utility');
		$basename = JRequest::getString(JUtility::getHash($this->_context.'.basename'),'__SITE__','cookie');
		$this->setState('basename',$basename);

		$compressed = JRequest::getInt(JUtility::getHash($this->_context.'.compressed'),1,'cookie');
		$this->setState('compressed',$compressed);
	}

	/**
	 * Method to get the record form.
	 *
	 * @param	array	$data		Data for the form.
	 * @param	boolean	$loadData	True if the form is to load its own data (default case), false if not.
	 *
	 * @return	mixed	A JForm object on success, false on failure
	 * @since	1.6
	 */
	public function getForm($data = array(), $loadData = true)
	{
		// Get the form.
		$form = $this->loadForm('com_banners.download', 'download', array('control' => 'jform', 'load_data' => $loadData));
		if (empty($form)) {
			return false;
		}

		return $form;
	}

	/**
	 * Method to get the data that should be injected in the form.
	 *
	 * @return	mixed	The data for the form.
	 * @since	1.6
	 */
	protected function loadFormData()
	{
		return array(
			'basename'		=> $this->getState('basename'),
			'compressed'	=> $this->getState('compressed')
		);
	}
}

The same content is in 3 releases, Joomla 1.7.3 to 1.7.5. See them all, or every version of this file.