phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] [18975] fix : added check on webserver_url before usi


From: Pascal Vilarem
Subject: [Phpgroupware-cvs] [18975] fix : added check on webserver_url before using it in cookie because at install time webserver_url is not yet defined
Date: Sat, 25 Oct 2008 19:22:25 +0000

Revision: 18975
          
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=18975
Author:   maat
Date:     2008-10-25 19:22:24 +0000 (Sat, 25 Oct 2008)

Log Message:
-----------
fix : added check on webserver_url before using it in cookie because at install 
time webserver_url is not yet defined

Modified Paths:
--------------
    core/trunk/phpgwapi/inc/class.sessions.inc.php

Modified: core/trunk/phpgwapi/inc/class.sessions.inc.php
===================================================================
--- core/trunk/phpgwapi/inc/class.sessions.inc.php      2008-10-25 19:10:27 UTC 
(rev 18974)
+++ core/trunk/phpgwapi/inc/class.sessions.inc.php      2008-10-25 19:22:24 UTC 
(rev 18975)
@@ -1443,7 +1443,15 @@
                        }
 
                        $secure = phpgw::get_var('HTTPS', 'bool', 'SERVER');
-                       session_set_cookie_params(0, 
$GLOBALS['phpgw_info']['server']['webserver_url'], $this->_cookie_domain, 
$secure, true);
+                       
+                       if ( 
isset($GLOBALS['phpgw_info']['server']['webserver_url']))
+                       {
+                               session_set_cookie_params(0, 
$GLOBALS['phpgw_info']['server']['webserver_url'], $this->_cookie_domain, 
$secure, true);
+                       }
+                       else
+                       {
+                               session_set_cookie_params(0, "/", 
$this->_cookie_domain, $secure, true);
+                       }
                        return $this->_cookie_domain;
                }
 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]