CoreFiles by mySites.guru
p3p.php34 lines, 842 bytes, from Joomla_1.7.4-Stable-Full_Package.zip
Raw History Compare with 1.7.3
md5
c59b86fab20cd665ff0b2f242141e15b
sha1
ffae6c1790dec66798da5b2ef1a5007d35561fcc
sha256
fe44b573ba101aa0d3bfdbc92ecdecc58d2a9492fe928d566a136d11d1330f88
<?php
/**
 * @version		$Id: p3p.php 21097 2011-04-07 15:38:03Z dextercowley $
 * @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.plugin.plugin');

/**
 * Joomla! P3P Header Plugin
 *
 * @package		Joomla.Plugin
 * @subpackage	System.p3p
 */
class plgSystemP3p extends JPlugin
{
	function onAfterInitialise()
	{
		// Get the header
		$header = $this->params->get('header','NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM');
		$header = trim($header);
		// Bail out on empty header (why would anyone do that?!)
		if( empty($header) )
		{
			return;
		}
		// Replace any existing P3P headers in the response
		JResponse::setHeader('P3P','CP="'.$header.'"',true);
	}
}

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