CoreFiles by mySites.guru
helper.php41 lines, 880 bytes, from Joomla_2.5.28-Stable-Full_Package.zip
Raw History Compare with 2.5.27
md5
621ba7cbcb8665ddd8de2ab2141dcc62
sha1
a14ff93e24919d20ecedf0904fae44bb23a325fe
sha256
f3246782da64ebcd900cc6e606d662141d08ba58596fd46737eeabd2189abf57
<?php
/**
 * @copyright	Copyright (C) 2005 - 2014 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')) || !$user->authorise('core.login.admin')) {
			$option = 'com_login';
		}

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

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

The same content is in 11 releases, Joomla 2.5.18 to 2.5.28. See them all, or every version of this file.