[xoops-cvslog 1610] CVS update: xoops2jp/html/modules/user/class

Zurück zum Archiv-Index

Minahito minah****@users*****
2006年 1月 8日 (日) 23:01:23 JST


Index: xoops2jp/html/modules/user/class/AbstractEditAction.class.php
diff -u /dev/null xoops2jp/html/modules/user/class/AbstractEditAction.class.php:1.1.2.1
--- /dev/null	Sun Jan  8 23:01:23 2006
+++ xoops2jp/html/modules/user/class/AbstractEditAction.class.php	Sun Jan  8 23:01:23 2006
@@ -0,0 +1,74 @@
+<?php
+
+require_once XOOPS_ROOT_PATH."/modules/user/admin/forms/GroupEditForm.class.php";
+
+class User_AbstractEditAction extends UserAction
+{
+	var $mObject = null;
+	var $mObjectHandler = null;
+	var $mActionForm=null;
+
+	function isSecure()
+	{
+		return true;
+	}
+
+	function getDefaultView(&$controller,&$xoopsUser)
+	{
+		$this->_setupActionForm();
+		$this->_setupObject($controller);
+
+		$this->mActionForm->load($this->mObject);
+
+		return USER_FRAME_VIEW_INPUT;
+	}
+	
+	function execute(&$controller,&$xoopsUser)
+	{
+		$this->_setupActionForm();
+		$this->_setupObject($controller);
+
+		//
+		// If image is no, the data has to continue to keep his value.
+		//
+		$this->mActionForm->load($this->mObject);
+
+		$this->mActionForm->fetch();
+		$this->mActionForm->validate();
+
+		if($this->mActionForm->hasError())
+			return USER_FRAME_VIEW_INPUT;
+			
+		$this->mActionForm->update($this->mObject);
+
+		return $this->mObjectHandler->insert($this->mObject) ? USER_FRAME_VIEW_SUCCESS
+		                                                     : USER_FRAME_VIEW_ERROR;
+	}
+
+	function _setupObject(&$controller)
+	{
+		$id = $this->_getId();
+		
+		$this->mObjectHandler =& $this->_getHandler();
+		
+		$this->mObject =& $this->mObjectHandler->get($id);
+		if (!is_object($this->mObject)) {
+			$this->mObject =& $this->mObjectHandler->create();
+		}
+	}
+	
+	function &_getHandler()
+	{
+	}
+	
+	function _getId()
+	{
+	}
+	
+	function _setupActionForm()
+	{
+	}
+
+}
+
+?>
\ No newline at end of file


xoops-cvslog メーリングリストの案内
Zurück zum Archiv-Index