summaryrefslogtreecommitdiff
path: root/framework/Web/THttpSession.php
diff options
context:
space:
mode:
authorgodzilla80@gmx.net <>2010-02-14 01:22:57 +0000
committergodzilla80@gmx.net <>2010-02-14 01:22:57 +0000
commit94e94e0a8566f23d16658a04c55b0bbfdd6689aa (patch)
tree72ffad82c279080dd9320d45dda26d64ffb4626f /framework/Web/THttpSession.php
parent966fd66f217911d079c4bd6a87b09f4a0c5c4736 (diff)
Merge Branches & Trunk
/trunk:r2680,2692,2707-2736 /branches/3.1:r2682-2686,2694-2702,2705,2738-2762
Diffstat (limited to 'framework/Web/THttpSession.php')
-rw-r--r--framework/Web/THttpSession.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/framework/Web/THttpSession.php b/framework/Web/THttpSession.php
index 96d70704..e9f815e5 100644
--- a/framework/Web/THttpSession.php
+++ b/framework/Web/THttpSession.php
@@ -4,7 +4,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2008 PradoSoft
+ * @copyright Copyright &copy; 2005-2008 PradoSoft
* @license http://www.pradosoft.com/license/
* @version $Id$
* @package System.Web
@@ -115,7 +115,7 @@ class THttpSession extends TApplicationComponent implements IteratorAggregate,Ar
if($this->_autoStart)
$this->open();
$this->_initialized=true;
- $this->getApplication()->setSession($this);
+ $this->getApplication()->setSession($this);
register_shutdown_function(array($this, "close"));
}
@@ -296,6 +296,7 @@ class THttpSession extends TApplicationComponent implements IteratorAggregate,Ar
{
ini_set('session.use_cookies','1');
ini_set('session.use_only_cookies','1');
+ ini_set('session.use_trans_sid', 0);
}
}
}
@@ -366,7 +367,12 @@ class THttpSession extends TApplicationComponent implements IteratorAggregate,Ar
if($this->_started)
throw new TInvalidOperationException('httpsession_transid_unchangeable');
else
- ini_set('session.use_trans_sid',TPropertyValue::ensureBoolean($value)?'1':'0');
+ {
+ $value=TPropertyValue::ensureBoolean($value);
+ if ($value && $this->getCookieMode()==THttpSessionCookieMode::Only)
+ throw new TInvalidOperationException('httpsession_transid_cookieonly');
+ ini_set('session.use_trans_sid',$value?'1':'0');
+ }
}
/**