CoreFiles by mySites.guru
p3p.php37 lines, 845 bytes, from Joomla_3.0.0-Stable-Full_Package.zip
Raw History Compare with 2.5.28
md5
4052d73619cc59a5edc43cdd404d57ea
sha1
e78e5d4d133f3ff2a5d513c58dc6bd875200b8d5
sha256
755a1790538f8ccb1f94cc5aee21b27d0bda527c2d506f02a7e85b1aa3c48d04
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  System.p3p
 *
 * @copyright   Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Joomla! P3P Header Plugin
 *
 * @package     Joomla.Plugin
 * @subpackage  System.p3p
 * @since       1.6
 */
class plgSystemP3p extends JPlugin
{
	/*
	 * @since   1.6
	 */
	public 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 3 releases, Joomla 3.0.0 to 3.0.2. See them all, or every version of this file.