CoreFiles by mySites.guru
contactemailsubject.php25 lines, 654 bytes, from Joomla_2.5.21-Stable-Full_Package.zip
Raw History Compare with 2.5.20
md5
7c5bc725a59509d6552f11ae585aa762
sha1
5102d50379924e996f895c9e896e30a851c8c412
sha256
c2f2c5a1d54165fa71c8e45c9dab8fe96d14051f0adba8533943678353803d22
<?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($item, $value) !== false)
					return false;
		}

		return true;
	}
}

The same content is in 5 releases, Joomla 2.5.20 to 2.5.24. See them all, or every version of this file.