CoreFiles by mySites.guru
contactemailmessage.php25 lines, 651 bytes, from Joomla_2.5.21-Stable-Full_Package.zip
Raw History Compare with 2.5.20
md5
9286806cb408cafcdb08ff9112529564
sha1
1be047826dca1ffacb911483f07d0c845fd86db0
sha256
9cf2f774456dfd7c443ff5f21405f239d611ce394af3db9c8f3a544716ea7689
<?php
/**
 * @package		Joomla.Site
 * @subpackage	Contact
 * @copyright	Copyright (C) 2005 - 2014 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 ($item != '' && JString::stristr($item, $value) !== false)
					return false;
		}

		return true;
	}
}

The same content is in 5 releases, Joomla 2.5.20 to 2.5.24. See them all, or every version of this file.