CoreFiles by mySites.guru
helper.php42 lines, 906 bytes, from Joomla_1.7.4-Stable-Full_Package.zip
Raw History Compare with 1.7.3
md5
e8277c906a14f833292f37dcb05564d2
sha1
b049820057627641f347b6ce92d7b5d9ffd7318b
sha256
089dc022593c972bf64e766efa9396326df94538c0b9f84fb6634501a8e2f3c8
<?php
/**
 * @version		$Id: helper.php 22338 2011-11-04 17:24:53Z github_bot $
 * @copyright	Copyright (C) 2005 - 2011 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;

/**
 * Joomla! Administrator Application helper class.
 * Provide many supporting API functions.
 *
 * @package		Joomla.Administrator
 * @subpackage	Application
 */
class JAdministratorHelper
{
	/**
	 * Return the application option string [main component].
	 *
	 * @return	string		Option.
	 * @since	1.5
	 */
	public static function findOption()
	{
		$option = strtolower(JRequest::getCmd('option'));

		$user = JFactory::getUser();
		if ($user->get('guest')) {
			$option = 'com_login';
		}

		if (empty($option)) {
			$option = 'com_cpanel';
		}

		JRequest::setVar('option', $option);
		return $option;
	}
}

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