CoreFiles by mySites.guru
helper.php50 lines, 1,004 bytes, from Joomla_3.6.3-Stable-Full_Package.zip
Raw History Compare with 3.6.2
md5
8e1c3412b0df3bbab419dd878d4afb65
sha1
881e2c3e228af6aa33b6f7bf06f160526b6b9cdb
sha256
c9049e7af2f9712fbafd46da72042d73ef0e1e842d3df369a21de8a8a13f1569
<?php
/**
 * @package    Joomla.Administrator
 *
 * @copyright  Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Joomla! Administrator Application helper class.
 * Provide many supporting API functions.
 *
 * @since       1.5
 *
 * @deprecated  4.0 Deprecated without replacement
 */
class JAdministratorHelper
{
	/**
	 * Return the application option string [main component].
	 *
	 * @return  string  The component to access.
	 *
	 * @since   1.5
	 */
	public static function findOption()
	{
		$app = JFactory::getApplication();
		$option = strtolower($app->input->get('option'));

		$app->loadIdentity();
		$user = $app->getIdentity();

		if ($user->get('guest') || !$user->authorise('core.login.admin'))
		{
			$option = 'com_login';
		}

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

		$app->input->set('option', $option);

		return $option;
	}
}

The same content is in 29 releases, Joomla 3.5.0-beta2 to 3.7.0-alpha1. See them all, or every version of this file.