CoreFiles by mySites.guru
banner.php41 lines, 811 bytes, from Joomla_1.7.4-Stable-Full_Package.zip
Raw History Compare with 1.7.3
md5
5213d47394b282c6fc5330c7fd249f35
sha1
5861e4293ca8a0c935d97a9a0770ef3f975000ff
sha256
cc938bc17e4152e6ea6723ca7c6b7d21f434284da9fdadfacb62f498de70857b
<?php
/**
 * @version		$Id: banner.php 22338 2011-11-04 17:24:53Z github_bot $
 * @package		Joomla.Site
 * @subpackage	com_banners
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * @package		Joomla.Site
 * @subpackage	com_banners
 */
abstract class BannerHelper
{
	/**
	 * Checks if a URL is an image
	 *
	 * @param string
	 * @return URL
	 */
	public static function isImage($url)
	{
		$result = preg_match('#\.(?:bmp|gif|jpe?g|png)$#i', $url);
		return $result;
	}

	/**
	 * Checks if a URL is a Flash file
	 *
	 * @param string
	 * @return URL
	 */
	public static function isFlash($url)
	{
		$result = preg_match('#\.swf$#i', $url);
		return $result;
	}
}

The same content is in 3 releases, Joomla 1.7.3 to 1.7.5. See them all, or every version of this file.