CoreFiles by mySites.guru
contactemailsubject.php25 lines, 654 bytes, from Joomla_2.5.25-Stable-Full_Package.zip
Raw History Compare with 2.5.24
md5
a6a2365767dcfd6b8c4045cf8e49c37a
sha1
cc85f0bacdded407a6739b6c246e5b57cf4c0563
sha256
d9b093ec91ff7019ec43a59c247c959ccac784f7dc781ed92fa7fe52550eb77c
<?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 JFormRuleContactEmailSubject extends JFormRule
{
	public function test(& $element, $value, $group = null, & $input = null, & $form = null)
	{
		$params = JComponentHelper::getParams('com_contact');
		$banned = $params->get('banned_subject');

		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.