CoreFiles by mySites.guru
contactemailmessage.php28 lines, 751 bytes, from Joomla_1.6.2-Stable-Full_Package.zip
Raw History Compare with 1.6.1
md5
bdb37d719bacb6a16393563ca089e6ac
sha1
1b974ee7fbb73545625209bc03fb17fe6f2eb6a6
sha256
a59a44ee01446ab222da753b17194936eb10fd24e129791a24f691759478f3e4
<?php
/**
 * @version		$Id: contactemailmessage.php 20982 2011-03-17 16:12:00Z chdemko $
 * @package		Joomla.Site
 * @subpackage	Contact
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

jimport('joomla.form.formrule');

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 5 releases, Joomla 1.6.2 to 1.6.6. See them all, or every version of this file.