CoreFiles by mySites.guru
contactemail.php32 lines, 782 bytes, from Joomla_2.5.19-Stable-Full_Package.zip
Raw History Compare with 2.5.18
md5
7d0a0a4a7b71e97b67a9777d46be21bc
sha1
3cc288176755e84a51e77e385e38b43ef6c35426
sha256
724231bc188f44fbeddc40756921516675f5393ff857871de186fc88116972a1
<?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;

require_once JPATH_PLATFORM. '/joomla/form/rules/email.php';

class JFormRuleContactEmail extends JFormRuleEmail
{
	public function test(& $element, $value, $group = null, & $input = null, & $form = null)
	{
		if(!parent::test($element, $value, $group, $input, $form)){
			return false;
		}

		$params = JComponentHelper::getParams('com_contact');
		$banned = $params->get('banned_email');

		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.