CoreFiles by mySites.guru
p3p.php37 lines, 846 bytes, from Joomla_3.1.0-Stable-Full_Package.zip
Raw History Compare with 3.0.4
md5
9a56d8f9262ebb6419f5291c0e4cf9cc
sha1
7c3ea5926fd0c15ff817727fcdf0869989bb3252
sha256
39c8ea543282a1ec4f974dd313e9038b90a4b05a7aa944dc09663affd6706d23
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  System.p3p
 *
 * @copyright   Copyright (C) 2005 - 2013 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 5 releases, Joomla 3.1.0 to 3.1.6. See them all, or every version of this file.