- md5
- ab521f616e8609c83c70f2e50eb85ccd
- sha1
- 41027fe2df80a4ad31988bea67c6b67a4c5cf1a4
- sha256
- 8bd1a4c2dba5b55712cea35dcd0c0b06da4f14f97b759e4f4ef6a184bf2d18ea
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
<?php
/**
* @package Joomla.Administrator
* @subpackage mod_login
*
* @copyright (C) 2010 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Helper for 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 '';
}
usort(
$languages,
function ($a, $b)
{
return strcmp($a['value'], $b['value']);
}
);
// Fix wrongly set parentheses in RTL languages
if (JFactory::getLanguage()->isRtl())
{
foreach ($languages as &$language)
{
$language['text'] = $language['text'] . '‎';
}
}
array_unshift($languages, JHtml::_('select.option', '', JText::_('JDEFAULTLANGUAGE')));
return JHtml::_('select.genericlist', $languages, 'lang', 'class="advancedSelect" tabindex="4"', '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');
}
}
/**
* Creates a list of two factor authentication methods used in com_users
* on user view
*
* @return array
*
* @deprecated 4.0 Use JAuthenticationHelper::getTwoFactorMethods() instead.
*/
public static function getTwoFactorMethods()
{
try
{
JLog::add(
sprintf('%s() is deprecated, use JAuthenticationHelper::getTwoFactorMethods() instead.', __METHOD__),
JLog::WARNING,
'deprecated'
);
}
catch (RuntimeException $exception)
{
// Informational log only
}
return JAuthenticationHelper::getTwoFactorMethods();
}
}
The same content is in 25 releases, Joomla 3.10.0-alpha2 to 3.10.12. See them all, or every version of this file.