CoreFiles by mySites.guru
helper.php52 lines, 1,240 bytes, from Joomla_1.5.2-Stable-Full_Package.zip
Raw History Compare with 1.5.1
md5
4395b85135262230e4e9012065314aa0
sha1
fa26338e5e09050694e49074f00465c9dbd37519
sha256
e79c5828476990bd33e3c559020086fd7d70501c8a7a7560aa0f6ca4029a82a1
<?php
/**
* @version		$Id: helper.php 9764 2007-12-30 07:48:11Z ircmaxell $
* @package		Joomla
* @copyright	Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
* @license		GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

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

/**
* Joomla! Administrator Application helper class
*
* Provide many supporting API functions
*
* @package		Joomla
* @final
*/
class JAdministratorHelper
{
	/**
	 * Return the application option string [main component]
	 *
	 * @access public
	 * @return string Option
	 * @since 1.5
	 */
	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 4 releases, Joomla 1.5.0 to 1.5.3. See them all, or every version of this file.