CoreFiles by mySites.guru
view.raw.php43 lines, 1,139 bytes, from Joomla_1.7.3-Stable-Full_Package.zip
Raw History Compare with 1.7.2
md5
27babbe1b02ac3257ca86180c2b750a9
sha1
8ba59b6bea9cc3fddd0f99fb4b3dcb7a8d50ea0c
sha256
f4e49a78c1fc93a5fc21871e79c1eff57af54ea60e2f1c7005de5d3db476bd3b
<?php
/**
 * @version		$Id: view.raw.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.view');

/**
 * View class for a list of tracks.
 *
 * @package		Joomla.Administrator
 * @subpackage	com_banners
 * @since		1.6
 */
class BannersViewTracks extends JView
{
	/**
	 * 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 3 releases, Joomla 1.7.3 to 1.7.5. See them all, or every version of this file.