Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

1668
 
1673
 
1673
 
session.php
_> 11 <?php
  22 /*
<> 3 -  $Id: session.php 1668 2007-07-20 14:53:24Z hpdl $
   3+  $Id: session.php 1673 2007-08-09 14:25:34Z hpdl $
44 
  55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
     
 !
7272 
  7373     public function __construct($name = null) {
  7474       $this->setName($name);
<> 75 -      $this->_setCookieParameters(SERVICE_SESSION_EXPIRATION_TIME);
   75+      $this->setCookieParameters();
7676 
  7777       if ( SERVICE_SESSION_EXPIRATION_TIME > 0 ) {
  7878         ini_set('session.gc_maxlifetime', SERVICE_SESSION_EXPIRATION_TIME * 60);
     
 !
250250 /**
  251251  * Sets the name of the session
  252252  *
<>  253+ * @param string $name The name of the session
253254  * @access public
  254255  */
  255256 
     
 !
266267 /**
  267268  * Sets the storage location for the file based storage handler
  268269  *
<>  270+ * @param string $path The file path to store the session data in
269271  * @access public
  270272  */
  271273 
     
 !
282284 /**
  283285  * Sets the cookie parameters for the session (lifetime, path, domain, secure, httponly)
  284286  *
<> 285 - * @access protected
   287+ * @param integer $lifetime The amount of minutes to keep a cookie active for
   288+ * @param string $path The web path of the online store to limit cookies to
   289+ * @param string $domain The domain of the online store to limit cookies to
   290+ * @param boolean $secure Only access cookies over a secure HTTPS connection
   291+ * @param boolean $httponly Only access cookies over a HTTP protocol (disallows javascript access to cookies)
   292+ * @access public
286293  */
  287294 
<> 288 -    protected function _setCookieParameters($lifetime = 0, $path = null, $domain = null, $secure = false, $httponly = false) {
   295+    public function setCookieParameters($lifetime = null, $path = null, $domain = null, $secure = false, $httponly = false) {
289296       global $request_type;
  290297 
  291298       if ( !is_numeric($lifetime) ) {
<> 292 -        $lifetime = 0;
   299+        $lifetime = SERVICE_SESSION_EXPIRATION_TIME * 60;
293300       }
  294301 
  295302       if ( empty($path) ) {
     
 !
306313 /**
  307314  * Returns the cookie parameters for the session (lifetime, path, domain, secure, httponly)
  308315  *
<>  316+ * @param string $key If specified, return only the value of this cookie parameter setting
309317  * @access public
  310318  */
  311319 
     
 !
314322         $this->_cookie_parameters = session_get_cookie_params();
  315323       }
  316324 
<> 317 -      if ( !empty($key) && isset($this->_cookie_parameters[$key]) ) {
   325+      if ( !empty($key) ) {
318326         return $this->_cookie_parameters[$key];
<> 319 -      } else {
  320 -        return false;
<_ 321327       }
  322328 
  323329       return $this->_cookie_parameters;