CoreFiles by mySites.guru
helper.php40 lines, 1,045 bytes, from Joomla_2.5.2-Stable-Full_Package.zip
Raw History Compare with 2.5.1
md5
d08a38191aefdf24b380b53b1b70292a
sha1
5786b4b5421800694a561843cc12679d56523548
sha256
5b347eae2e4961c78e9b8745cde9491d572b1c9f77adc3bfe66dffa8949f95c1
<?php
/**
 * @package		Joomla.Administrator
 * @subpackage	mod_version
 * @copyright	Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;

/**
 * @package		Joomla.Administrator
 * @subpackage	mod_version
 * @since		1.6
 */
abstract class modVersionHelper
{
	/**
	 * Get the member items of the submenu.
	 *
	 * @return	mixed	An arry of menu items, or false on error.
	 */
	public static function getVersion(&$params)
	{
		$format = $params->get('format', 'short');
		$product = $params->get('product', 0);
		$method = 'get' . ucfirst($format) . "Version";

		// Get the joomla version
		$instance = new JVersion();
		$version = call_user_func(array($instance, $method));//$instance->{$method};

		if ($format=='short' && !empty($product)) {
			//add the product name to short format only (in long format it's included)
			$version = $instance->PRODUCT . ' ' . $version;
		}
		return $version;
	}
}

The same content is in 8 releases, Joomla 2.5.1 to 2.5.8. See them all, or every version of this file.