CoreFiles by mySites.guru
view.raw.php43 lines, 1,091 bytes, from Joomla_3.0.3-Stable-Full_Package.zip
Raw History Compare with 3.0.2
md5
64b46e7480cb65d33470f30b4a28ad8e
sha1
835d671f627efdcb672f18f0a8b2e4e19a8a9c9e
sha256
b072e4ebe0c90988d81e9d83a6547ad8246e5cf29dbfe871a1102ed2b1b209c1
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_banners
 *
 * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * View class for a list of tracks.
 *
 * @package     Joomla.Administrator
 * @subpackage  com_banners
 * @since       1.6
 */
class BannersViewTracks extends JViewLegacy
{
	/**
	 * Display the view
	 */
	public function display($tpl = null)
	{
		$basename		= $this->get('BaseName');
		$filetype		= $this->get('FileType');
		$mimetype		= $this->get('MimeType');
		$content		= $this->get('Content');

		// Check for errors.
		if (count($errors = $this->get('Errors')))
		{
			JError::raiseError(500, implode("\n", $errors));
			return false;
		}

		$document = JFactory::getDocument();
		$document->setMimeEncoding($mimetype);
		JResponse::setHeader('Content-disposition', 'attachment; filename="'.$basename.'.'.$filetype.'"; creation-date="'.JFactory::getDate()->toRFC822().'"', true);
		echo $content;
	}
}

The same content is in 7 releases, Joomla 3.0.3 to 3.1.6. See them all, or every version of this file.