summaryrefslogtreecommitdiff
path: root/framework/Web/THttpRequest.php
diff options
context:
space:
mode:
authorChristophe.Boulain <>2010-01-14 12:42:44 +0000
committerChristophe.Boulain <>2010-01-14 12:42:44 +0000
commitb1f71c1b816615bb8e38728a1c76051c1ef7517f (patch)
tree007d6cd3ec8c3859308b85363aeda86c67f4bb13 /framework/Web/THttpRequest.php
parent10b1f048ceca6d875000335056dc6ef2f2a6bfe4 (diff)
Fixed Issue#86
Diffstat (limited to 'framework/Web/THttpRequest.php')
-rw-r--r--framework/Web/THttpRequest.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/framework/Web/THttpRequest.php b/framework/Web/THttpRequest.php
index 7100a4c5..c3926d08 100644
--- a/framework/Web/THttpRequest.php
+++ b/framework/Web/THttpRequest.php
@@ -105,7 +105,7 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar
/**
* @var boolean whether the session ID should be kept in cookie only
*/
- private $_cookieOnly=false;
+ private $_cookieOnly=null;
private $_urlFormat=THttpRequestUrlFormat::Get;
private $_services;
private $_requestResolved=false;
@@ -172,8 +172,6 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar
$_SERVER['HTTP_USER_AGENT']='';
}
- $this->_cookieOnly=(int)ini_get('session.use_cookies') && (int)ini_get('session.use_only_cookies');
-
// Info about server variables:
// PHP_SELF contains real URI (w/ path info, w/o query string)
// SCRIPT_NAME is the real URI for the requested script (w/o path info and query string)
@@ -568,6 +566,8 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar
*/
public function constructUrl($serviceID,$serviceParam,$getItems=null,$encodeAmpersand=true,$encodeGetItems=true)
{
+ if ($this->_cookieOnly===null)
+ $this->_cookieOnly=(int)ini_get('session.use_cookies') && (int)ini_get('session.use_only_cookies');
$url=$this->_urlManager->constructUrl($serviceID,$serviceParam,$getItems,$encodeAmpersand,$encodeGetItems);
if(defined('SID') && SID != '' && !$this->_cookieOnly)
return $url . (strpos($url,'?')===false? '?' : ($encodeAmpersand?'&amp;':'&')) . SID;