CoreFiles by mySites.guru
contactemailmessage.php25 lines, 651 bytes, from Joomla_2.5.28-Stable-Full_Package.zip
Raw History Compare with 2.5.27
md5
209182da31c8df5f1588bab4c2e6fdc8
sha1
d0632bae24077a314f6aa33531eb2946b215139e
sha256
0977ebccd3531b4732cd7e419a924eb961844b8ed4ea45eec060d76f4f55b26c
<?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($value, $item) !== false)
					return false;
		}

		return true;
	}
}

The same content is in 4 releases, Joomla 2.5.25 to 2.5.28. See them all, or every version of this file.