CoreFiles by mySites.guru
helper.php41 lines, 1,037 bytes, from Joomla_1.5.2-Stable-Full_Package.zip
Raw History Compare with 1.5.1
md5
e96a1afd3ff4c3d1e1b19a497dfefc31
sha1
2742755cf3905a6a9c995d16b76741030780c86d
sha256
94b9f7c25e885159ee9e0316601d8d2d6780e635b83b823a27da60a1c304609d
<?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');

class modLoginHelper
{
	function getReturnURL($params, $type)
	{
		if($itemid =  $params->get($type))
		{
			$url = 'index.php?Itemid='.$itemid;
			$url = JRoute::_($url, false);
		}
		else
		{
			// Redirect to login
			$uri = JFactory::getURI();
			$url = $uri->toString();
		}

		return base64_encode($url);
	}

	function getType()
	{
		$user = & JFactory::getUser();
	    return (!$user->get('guest')) ? 'logout' : 'login';
	}
}

The same content is in 3 releases, Joomla 1.5.0 to 1.5.2. See them all, or every version of this file.