CoreFiles by mySites.guru
helper.php46 lines, 1,154 bytes, from Joomla_2.5.2-Stable-Full_Package.zip
Raw History Compare with 2.5.1
md5
f3001ab228f17c454b829d22b45c1803
sha1
45ad759b77d62c797f237fc4fd324c2cdbbc5d5c
sha256
f92edf409d2802e3258574cd01d9a15f9721ddc9de9a7a3437a1224008709e61
<?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;

/**
 * @package		Joomla.Administrator
 * @subpackage	mod_login
 * @since		1.6
 */
abstract class modLoginHelper
{
	/**
	 * Get an HTML select list of the available languages.
	 *
	 * @return	string
	 */
	public static function getLanguageList()
	{
		jimport('joomla.language.helper');
		$languages = array();
		$languages = JLanguageHelper::createLanguageList(null, JPATH_ADMINISTRATOR, false, true);
		array_unshift($languages, JHtml::_('select.option', '', JText::_('JDEFAULT')));
		return JHtml::_('select.genericlist', $languages, 'lang', ' class="inputbox"', 'value', 'text', null);
	}

	/**
	 * Get the redirect URI after login.
	 *
	 * @return	string
	 */
	public static function getReturnURI()
	{
		$uri = JFactory::getURI();
		$return = 'index.php'.$uri->toString(array('query'));
		if($return != 'index.php?option=com_login'){
			return base64_encode($return);
		} else {
			return base64_encode('index.php');
		}
	}
}

The same content is in 4 releases, Joomla 2.5.0 to 2.5.3. See them all, or every version of this file.