| [ Index ] |
PHP Cross Reference of Joomla 1.5.26 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @version $Id: session.php 14401 2010-01-26 14:10:00Z louis $ 4 * @package Joomla.Legacy 5 * @subpackage 1.5 6 * @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved. 7 * @license GNU/GPL, see LICENSE.php 8 * Joomla! is free software. This version may have been modified pursuant 9 * to the GNU General Public License, and as distributed it includes or 10 * is derivative of works licensed under the GNU General Public License or 11 * other free or open source software licenses. 12 * See COPYRIGHT.php for copyright notices and details. 13 */ 14 15 // Check to ensure this file is within the rest of the framework 16 defined('JPATH_BASE') or die(); 17 18 // Register legacy classes for autoloading 19 JLoader::register('JTableSession', JPATH_LIBRARIES.DS.'joomla'.DS.'database'.DS.'table'.DS.'session.php'); 20 21 /** 22 * Legacy class, use {@link JTableSession} instead 23 * 24 * @deprecated As of version 1.5 25 * @package Joomla.Legacy 26 * @subpackage 1.5 27 */ 28 class mosSession extends JTableSession 29 { 30 /** 31 * Constructor 32 */ 33 function __construct(&$db) 34 { 35 parent::__construct( $db ); 36 } 37 38 function mosSession(&$db) 39 { 40 parent::__construct( $db ); 41 } 42 43 /** 44 * Encodes a session id 45 */ 46 function hash( $value ) 47 { 48 global $mainframe; 49 50 if (phpversion() <= '4.2.1') { 51 $agent = getenv( 'HTTP_USER_AGENT' ); 52 } else { 53 $agent = $_SERVER['HTTP_USER_AGENT']; 54 } 55 56 return md5( $agent . $mainframe->getCfg('secret') . $value . $_SERVER['REMOTE_ADDR'] ); 57 } 58 59 /** 60 * Set the information to allow a session to persist 61 */ 62 function persist() 63 { 64 global $mainframe; 65 66 $usercookie = mosGetParam( $_COOKIE, 'usercookie', null ); 67 if ($usercookie) { 68 // Remember me cookie exists. Login with usercookie info. 69 $mainframe->login( $usercookie['username'], $usercookie['password'] ); 70 } 71 } 72 73 /** 74 * Legacy Method, use {@link JTable::reorder()} instead 75 * @deprecated As of 1.5 76 */ 77 function updateOrder( $where='' ) 78 { 79 return $this->reorder( $where ); 80 } 81 82 /** 83 * Legacy Method, use {@link JTable::publish()} instead 84 * @deprecated As of 1.0.3 85 */ 86 function publish_array( $cid=null, $publish=1, $user_id=0 ) 87 { 88 $this->publish( $cid, $publish, $user_id ); 89 } 90 91 /** 92 * Legacy Method, use {@link JTable::publish()} instead 93 * @deprecated As of 1.5 94 */ 95 function setFromRequest( $key, $varName, $default=null ) 96 { 97 if (isset( $_REQUEST[$varName] )) { 98 return $_SESSION[$key] = $_REQUEST[$varName]; 99 } else if (isset( $_SESSION[$key] )) { 100 return $_SESSION[$key]; 101 } else { 102 return $_SESSION[$key] = $default; 103 } 104 } 105 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Mar 28 15:54:07 2012 | Cross-referenced by PHPXref 0.7.1 |