[xoops-cvslog 1771] CVS update: xoops2jp/html/class

Back to archive index

Minahito minah****@users*****
2006年 1月 15日 (日) 03:27:39 JST


Index: xoops2jp/html/class/XCube_ActionForm.class.php
diff -u xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.20 xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.21
--- xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.20	Sat Jan 14 14:23:42 2006
+++ xoops2jp/html/class/XCube_ActionForm.class.php	Sun Jan 15 03:27:39 2006
@@ -27,6 +27,8 @@
 	var $mErrorFlag=false;
 	
 	var $mErrorMessages=array();
+	
+	var $_mToken = null;
 
 	function XCube_ActionForm()
 	{
@@ -43,12 +45,14 @@
 	
 	function getToken()
 	{
-        srand (microtime() * 100000);
-        $value = md5(XOOPS_SALT . uniqid(rand(), true));
-		
-		$_SESSION['XCUBE_TOKEN'][$this->getTokenName()] = $value;
+		if ($this->_mToken == null) {
+			srand (microtime() * 100000);
+			$this->_mToken = md5(XOOPS_SALT . uniqid(rand(), true));
+			
+			$_SESSION['XCUBE_TOKEN'][$this->getTokenName()] = $this->_mToken;
+		}
 
-		return $value;
+		return $this->_mToken;
 	}
 	
 	function set()


xoops-cvslog メーリングリストの案内
Back to archive index