CoreFiles by mySites.guru
contactemailmessage.php25 lines, 636 bytes, from Joomla_2.5.19-Stable-Full_Package.zip
Raw History Compare with 2.5.18
md5
5de499ac3bbb5c030dc0a55fa85b5b31
sha1
85bc6f4432481f5a3046fb867e5a4ae1b8779512
sha256
8aa9652e4832a6c8e8ac01b6833fad84add20251fa8052e464518d671e83f3a8
<?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 (JString::stristr($item, $value) !== false)
					return false;
		}

		return true;
	}
}

The same content is in 2 releases, Joomla 2.5.18 to 2.5.19. See them all, or every version of this file.