CoreFiles by mySites.guru
helper.php59 lines, 1,275 bytes, from Joomla_3.1.6-Stable-Full_Package.zip
Raw History Compare with 3.1.5
md5
23504df0b095c7284dea32556741925d
sha1
5c39926fcf0e69a5735c012de630c06263f07c86
sha256
9ada60bb8d5366461b124110579b73160047110d2f5b64b44b4169fbe5a747b4
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  mod_login
 *
 * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Helper for mod_login
 *
 * @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()
	{
		$languages = JLanguageHelper::createLanguageList(null, JPATH_ADMINISTRATOR, false, true);

		if (count($languages) <= 1)
		{
			return '';
		}

		array_unshift($languages, JHtml::_('select.option', '', JText::_('JDEFAULTLANGUAGE')));

		return JHtml::_('select.genericlist', $languages, 'lang', ' class="inputbox advancedSelect"', 'value', 'text', null);
	}

	/**
	 * Get the redirect URI after login.
	 *
	 * @return  string
	 */
	public static function getReturnURI()
	{
		$uri    = JUri::getInstance();
		$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 3 releases, Joomla 3.1.4 to 3.1.6. See them all, or every version of this file.