CoreFiles by mySites.guru
helper.php41 lines, 880 bytes, from Joomla_2.5.7-Stable-Full_Package.zip
Raw History Compare with 2.5.6
md5
5f05babeedee1234fb91a15bd190777c
sha1
7d74de5c0c66e6f4acb0afa0b147aa39e3fb95e4
sha256
a686e98e1103dfee00bb175096cc3e528784abca322f8e2062e6b8f4d7dee773
<?php
/**
 * @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;

/**
 * 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 4 releases, Joomla 2.5.5 to 2.5.8. See them all, or every version of this file.