CoreFiles by mySites.guru
contactemailmessage.php25 lines, 636 bytes, from Joomla_2.5.2-Stable-Full_Package.zip
Raw History Compare with 2.5.1
md5
aeaf95a2d3a69a767cacbc9a0ec36a6b
sha1
10eee467afa2f72e7c139a3bfc388a89685f4504
sha256
e668980e45e75835bc6cfa69e7084be96e27a8f8af6ee4ac5b0068d59be616ff
<?php
/**
 * @package		Joomla.Site
 * @subpackage	Contact
 * @copyright	Copyright (C) 2005 - 2012 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 9 releases, Joomla 2.5.0 to 2.5.8. See them all, or every version of this file.