CoreFiles by mySites.guru
contactemailmessage.php25 lines, 636 bytes, from Joomla_2.5.13-Stable-Full_Package.zip
Raw History Compare with 2.5.11
md5
62d576ee3284224914fe19340637c8f7
sha1
50471fa469fc3689c1e4da8daba030275a72848e
sha256
56908b08d5e0314d236afbb0ce684ba8f02e2484797025af326704cf661b4871
<?php
/**
 * @package		Joomla.Site
 * @subpackage	Contact
 * @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;

class JFormRuleContactEmailMessage extends JFormRule
{
	public function test(& $element, $value, $group = null, & $input = null, & $form = null)
	{
		$params = JComponentHelper::getParams('com_contact');
		$banned = $params->get('banned_text');

		foreach(explode(';', $banned) as $item){
			if (JString::stristr($item, $value) !== false)
					return false;
		}

		return true;
	}
}

The same content is in 8 releases, Joomla 2.5.9 to 2.5.17. See them all, or every version of this file.