[xoops-cvslog 6373] CVS update: xoops2jp/html/core

Back to archive index

Minahito minah****@users*****
2007年 4月 26日 (木) 13:11:30 JST


Index: xoops2jp/html/core/XCube_ActionForm.class.php
diff -u xoops2jp/html/core/XCube_ActionForm.class.php:1.1.2.6.2.1 xoops2jp/html/core/XCube_ActionForm.class.php:1.1.2.6.2.2
--- xoops2jp/html/core/XCube_ActionForm.class.php:1.1.2.6.2.1	Mon Feb 26 13:01:30 2007
+++ xoops2jp/html/core/XCube_ActionForm.class.php	Thu Apr 26 13:11:30 2007
@@ -2,7 +2,7 @@
 /**
  *
  * @package XCube
- * @version $Id: XCube_ActionForm.class.php,v 1.1.2.6.2.1 2007/02/26 04:01:30 minahito Exp $
+ * @version $Id: XCube_ActionForm.class.php,v 1.1.2.6.2.2 2007/04/26 04:11:30 minahito Exp $
  * @copyright Copyright 2005, 2006 XOOPS Cube Project <http://xoopscube.org/>
  * @license http://xoopscube.sourceforge.net/bsd_licenses.txt Modified BSD license
  *
@@ -37,6 +37,10 @@
  * current HTTP request is from the web service, the token isn't needed.
  * Therefore, this class decides whether to use the token with the information
  * of the context.
+ * 
+ * @remark This class is diable for XCube_Service, because the class uses SESSION
+ *         directly. XCube_ActionForm will be changed in the near feature.
+ *         Developers need to pay attention to spec change.
  *
  * @package XCube
  */
@@ -260,22 +264,11 @@
 	}
 	
 	/**
-	 * Execute validation, so if a input value is wrong, error messages are
-	 * added to error message buffer. The procedure of validation is the
-	 * following:
-	 * 
-	 * 1. If this object have token name, validate one time tokens.
-	 * 2. Call the validation member function of all field properties.
-	 * 3. Call the member function that is defined in the sub-class.
-	 * 
-	 * For a basis, validations are done by functions of each field properties.
-	 * But, the sub-class can define own validation logic. Define member
-	 * functions whose name is "validate" + "form name". For example, to
-	 * validate "message" define "validateMessage()" function.
-	 * 
-	 * @return void
+	 * Validates the token. This method is deprecated, because XCube_Action will
+	 * be changed for multi-layer. So this method is called by only this class.
+	 * @protected
 	 */
-	function validate()
+	function _validateToken()
 	{
 		//
 		// check onetime & transaction token
@@ -313,6 +306,28 @@
 			//
 			unset($_SESSION['XCUBE_TOKEN'][$this->getTokenName()]);
 		}
+	}
+	
+	
+	/**
+	 * Execute validation, so if a input value is wrong, error messages are
+	 * added to error message buffer. The procedure of validation is the
+	 * following:
+	 * 
+	 * 1. If this object have token name, validate one time tokens.
+	 * 2. Call the validation member function of all field properties.
+	 * 3. Call the member function that is defined in the sub-class.
+	 * 
+	 * For a basis, validations are done by functions of each field properties.
+	 * But, the sub-class can define own validation logic. Define member
+	 * functions whose name is "validate" + "form name". For example, to
+	 * validate "message" define "validateMessage()" function.
+	 * 
+	 * @return void
+	 */
+	function validate()
+	{
+		$this->_validateToken();
 		
 		foreach (array_keys($this->mFormProperties) as $name) {
 			if (isset($this->mFieldProperties[$name])) {


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