CoreFiles by mySites.guru
helper.php42 lines, 1,050 bytes, from Joomla_1.5.5-Stable-Full_Package.zip
Raw History Compare with 1.5.4
md5
eaa575adccf5642ebf5936c77cd8fa7c
sha1
e271317e97c7af8e7391a80fdf740ad2a2d43890
sha256
4cf351c5ec4ff9290c9ee36c091267561397a05f1cea6443a38b31cedfd9c044
<?php
/**
* @version		$Id: helper.php 10381 2008-06-01 03:35:53Z pasamio $
* @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))
		{
			$menu =& JSite::getMenu();
			$item = $menu->getItem($itemid);
			$url = $item->link;
		}
		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 4 releases, Joomla 1.5.4 to 1.5.7. See them all, or every version of this file.