CoreFiles by mySites.guru
contactemailsubject.php25 lines, 639 bytes, from Joomla_2.5.18-Stable-Full_Package.zip
Raw History Compare with 2.5.17
md5
b95f2470d0d3ae57b73ff9a8d13471bf
sha1
1cab8d11faea207e4ac2625ba751659ac0028a11
sha256
e70a2f38183424a920c89ae669fa70355871df76a1cbc0d4d9ab4e913180abf9
<?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 (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.