[xoops-cvslog 1837] CVS update: xoops2jp/html/modules/user/actions

Back to archive index

Minahito minah****@users*****
2006年 1月 18日 (水) 22:09:25 JST


Index: xoops2jp/html/modules/user/actions/AvatarUploadAction.class.php
diff -u /dev/null xoops2jp/html/modules/user/actions/AvatarUploadAction.class.php:1.1.2.1
--- /dev/null	Wed Jan 18 22:09:25 2006
+++ xoops2jp/html/modules/user/actions/AvatarUploadAction.class.php	Wed Jan 18 22:09:25 2006
@@ -0,0 +1,52 @@
+<?php
+
+require_once XOOPS_MODULE_PATH . "/user/class/AbstractEditAction.class.php";
+require_once XOOPS_MODULE_PATH . "/user/forms/AvatarUploadForm.class.php";
+
+class User_EditUserAction extends User_AbstractEditAction
+{
+	function _getId()
+	{
+		return isset($_REQUEST['uid']) ? intval($_REQUEST['uid']) : 0;
+	}
+	
+	function &_getHandler()
+	{
+		$handler =& xoops_gethandler('user');
+		return $handler;
+	}
+
+	function _setupActionForm()
+	{
+		$this->mActionForm=new AvatarUploadForm();
+		$this->mActionForm->prepare();
+	}
+	
+	function isEnableCreate()
+	{
+		return false;
+	}
+
+	function isSecure()
+	{
+		return true;
+	}
+	
+	function isPerm(&$controller, &$xoopsUser)
+	{
+		if ($this->mObject != null) {
+			return ($this->mObject->get('uid') == $xoopsUser->get('uid') || $xoopsUser->isAdmin());
+		}
+		
+		return false;
+	}
+
+	function executeViewInput(&$controller,&$xoopsUser,&$renderSystem)
+	{
+		$renderSystem->setTemplateName("user_avatarupload.html");
+		$renderSystem->setAttribute("actionForm",$this->mActionForm);
+		$renderSystem->setAttribute("thisUser",$this->mObject);
+	}
+}
+
+?>
\ No newline at end of file


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