CoreFiles by mySites.guru
p3p.php35 lines, 841 bytes, from Joomla_1.6.1-Stable-Full_Package.zip
Raw History Compare with 1.6.0
md5
1743b0713314735e73b325175d70934d
sha1
55033b696097461df0384d8e7485c4621fcca098
sha256
10e3098396310234dd377b21b75ee1b523b479c423f798522545333ff8aa36ad
<?php
/**
 * @version		$Id: p3p.php 20196 2011-01-09 02:40:25Z ian $
 * @package		Joomla
 * @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
 * @subpackage	System
 */
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 2 releases, Joomla 1.6.0 to 1.6.1. See them all, or every version of this file.