CoreFiles by mySites.guru
view.raw.php48 lines, 1,265 bytes, from Joomla_3.3.3-Stable-Full_Package.zip
Raw History Compare with 3.3.2
md5
65b63614144f3c7cae7034b933d9c110
sha1
a713294a48d403c8c2b0e2e2ce3dedf72b3d22f2
sha256
f139ab4cc2326f3813b76570dbfca7ea46b6582646ebdd6e03c989fb28e7d0a4
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_banners
 *
 * @copyright   Copyright (C) 2005 - 2014 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
	 *
	 * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
	 *
	 * @return  void
	 */
	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);
		JFactory::getApplication()->setHeader('Content-disposition', 'attachment; filename="' . $basename . '.' . $filetype . '"; creation-date="' . JFactory::getDate()->toRFC822() . '"', true);
		echo $content;
	}
}

The same content is in 13 releases, Joomla 3.2.2 to 3.3.6. See them all, or every version of this file.