[xoops-cvslog 2076] CVS update: xoops2jp/html/modules/comment/actions

Back to archive index

Minahito minah****@users*****
2006年 2月 2日 (木) 18:29:00 JST


Index: xoops2jp/html/modules/comment/actions/CommentPostAction.class.php
diff -u xoops2jp/html/modules/comment/actions/CommentPostAction.class.php:1.1.2.5 xoops2jp/html/modules/comment/actions/CommentPostAction.class.php:removed
--- xoops2jp/html/modules/comment/actions/CommentPostAction.class.php:1.1.2.5	Sat Nov 26 14:12:56 2005
+++ xoops2jp/html/modules/comment/actions/CommentPostAction.class.php	Thu Feb  2 18:28:59 2006
@@ -1,112 +0,0 @@
-<?php
-
-require_once XOOPS_ROOT_PATH."/modules/comment/forms/CommentPostForm.class.php";
-require_once XOOPS_ROOT_PATH."/modules/base/kernel/Legacy_UserAccountAdapter.class.php";
-
-class CommentPostAction extends CommentAction
-{
-	var $mComment;
-	var $mActionForm;
-
-	var $mReplyAttribte;
-	var $mItemId;
-	
-	function prepare(&$controller,&$xoopsUser)
-	{
-		parent::prepare($controller,$xoopsUser);
-		$controller->mRoot->mLanguageManager->loadModuleLanguage("comment");
-		$this->_processActionForm($controller);
-	}
-
-	/**
-	 * @param $controller Base_Controller
-	 * @param $xoopsUser XoopsUserObject
-	 */
-	function getDefaultView(&$controller,&$xoopsUser)
-	{
-		//
-		// We cannot but depend on global variable here for compatibility with 2.0.x.
-		// The cause is that a includer use global variable for parameters.
-		//
-		global $com_replytitle, $com_replytext;
-		if(isset($_REQUEST['com_replytitle']) || isset($_REQUEST['com_replytext'])) {
-			die("Wrong parameter");
-		}
-
-		if(!empty($com_replytitle))
-			$this->mReplyAttribte['title']=$com_replytitle;
-
-		if(!empty($com_replytext))
-			$this->mReplyAttribte['text']=$com_replytext;
-		
-		//
-		// Get object ID
-		//
-		$xoopsModule=&$controller->mModuleController->getXoopsModule();
-		$commentConfig=$xoopsModule->getInfo('comments');
-
-		$mid=$xoopsModule->getVar('mid');
-		$className=$commentConfig['pageName'];
-		$object=$controller->mRoot->ContentManager->fetchContent($mid,$className,intval($_REQUEST['com_itemid']));
-
-		$this->mActionForm->load($object,$this->mReplyAttribte);
-		
-		return COMMENT_FRAME_VIEW_INPUT;
-	}
-	
-	function execute(&$controller,&$xoopsUser)
-	{
-		$this->mActionForm->fetch();
-		$this->mActionForm->validate();
-		
-		if($this->mActionForm->hasError()){
-			// TODO Add code
-			return COMMENT_FRAME_VIEW_INPUT;
-		}
-
-		//
-		// Set up parameters
-		//
-		$this->_processService($controller);
-
-		$parameters=array();
-
-		$parameters['Title']=$this->mActionForm->getVar('title');
-		$parameters['Message']=$this->mActionForm->getVar('text');
-		$parameters['ObjectId']=$this->mActionForm->getVar('objId');
-		$parameters['User']=new Legacy_UserAccountAdapter($xoopsUser);
-		$parameters['User']=&$xoopsUser;
-	
-		$result=&$this->mClient->call("post",$parameters);
-
-		return $result!==false ? COMMENT_FRAME_VIEW_SUCCESS : COMMENT_FRAME_VIEW_ERROR;
-	}
-	
-	function _processActionForm($controoler)
-	{
-		$this->mActionForm=new CommentPostForm();
-		$this->mActionForm->prepare();
-	}
-	
-	function executeViewSuccess(&$controller,&$xoopsUser,&$renderSystem)
-	{
-		XCube_Utils::redirectHeader(XOOPS_URL,1,"insert!");
-	}
-
-	function executeViewError(&$controller,&$xoopsUser,&$renderSystem)
-	{
-		//
-		// TODO
-		//
-		die();
-	}
-
-	function executeViewInput(&$controller,&$xoopsUser,&$renderSystem)
-	{
-		$renderSystem->setTemplateName("comment_post_input.html");
-		$renderSystem->setAttribute("actionForm",$this->mActionForm);
-		$renderSystem->setAttribute("reply",$this->mReplyAttribte);
-	}
-}
-
-?>
\ No newline at end of file
Index: xoops2jp/html/modules/comment/actions/CommentReplyAction.class.php
diff -u xoops2jp/html/modules/comment/actions/CommentReplyAction.class.php:1.1.2.4 xoops2jp/html/modules/comment/actions/CommentReplyAction.class.php:removed
--- xoops2jp/html/modules/comment/actions/CommentReplyAction.class.php:1.1.2.4	Fri Nov 25 00:17:48 2005
+++ xoops2jp/html/modules/comment/actions/CommentReplyAction.class.php	Thu Feb  2 18:28:59 2006
@@ -1,82 +0,0 @@
-<?php
-
-require_once XOOPS_ROOT_PATH."/modules/comment/forms/CommentReplyForm.class.php";
-require_once XOOPS_ROOT_PATH."/modules/base/kernel/Legacy_UserAccountAdapter.class.php";
-
-class CommentReplyAction extends CommentAction
-{
-	var $mComment;
-	var $mActionForm;
-
-	function prepare(&$controller,&$xoopsUser)
-	{
-		parent::prepare($controller,$xoopsUser);
-		$this->_processActionForm($controller);
-	}
-
-	/**
-	 * @param $controller Base_Controller
-	 * @param $xoopsUser XoopsUserObject
-	 */
-	function getDefaultView(&$controller,&$xoopsUser)
-	{
-		$pid=isset($_REQUEST['pid']) ? intval($_REQUEST['pid']) : 0;
-
-		$parameters=array('Id'=>$pid);
-		$comment=&$this->mClient->call("getComment",$parameters);
-		
-		if(!is_object($comment))
-			return COMMENT_FRAME_VIEW_ERROR;
-
-		$this->mActionForm->load($comment);
-
-		if(is_object($comment)) {
-			$this->mComment=&$comment;
-			return COMMENT_FRAME_VIEW_INPUT;
-		}
-		
-		return COMMENT_FRAME_VIEW_ERROR;
-	}
-	
-	function execute(&$controller,&$xoopsUser)
-	{
-		$this->mActionForm->fetch();
-		$this->mActionForm->validate();
-		
-		if($this->mActionForm->hasError()){
-			// TODO Add code
-			return COMMENT_FRAME_VIEW_INPUT;
-		}
-
-		$parameters=array();
-		$parameters['ParentId']=$this->mActionForm->getVar('pid');
-		$parameters['User']=new Legacy_UserAccountAdapter($xoopsUser);
-		$parameters['User']=$xoopsUser;
-		$parameters['Title']=$this->mActionForm->getVar('title');
-		$parameters['Message']=$this->mActionForm->getVar('message');
-
-		$result=&$this->mClient->call("postResponse",$parameters);
-
-		return COMMENT_FRAME_VIEW_SUCCESS;
-	}
-	
-	function _processActionForm($controoler)
-	{
-		$this->mActionForm=new CommentReplyForm();
-		$this->mActionForm->prepare();
-	}
-	
-	function executeViewSuccess(&$controller,&$xoopsUser,&$renderSystem)
-	{
-		XCube_Utils::redirectHeader(XOOPS_URL,1,"responce!");
-	}
-
-	function executeViewInput(&$controller,&$xoopsUser,&$renderSystem)
-	{
-		$renderSystem->setTemplateName("comment_reply_input.html");
-		$renderSystem->setAttribute("comment",$this->mComment);
-		$renderSystem->setAttribute("actionForm",$this->mActionForm);
-	}
-}
-
-?>
\ No newline at end of file
Index: xoops2jp/html/modules/comment/actions/CommentDeleteAction.class.php
diff -u xoops2jp/html/modules/comment/actions/CommentDeleteAction.class.php:1.1.2.3 xoops2jp/html/modules/comment/actions/CommentDeleteAction.class.php:removed
--- xoops2jp/html/modules/comment/actions/CommentDeleteAction.class.php:1.1.2.3	Fri Nov 25 00:18:25 2005
+++ xoops2jp/html/modules/comment/actions/CommentDeleteAction.class.php	Thu Feb  2 18:28:59 2006
@@ -1,58 +0,0 @@
-<?php
-
-class CommentDeleteAction extends CommentAction
-{
-	var $mComment;
-
-	/**
-	 * @param $controller Base_Controller
-	 * @param $xoopsUser XoopsUserObject
-	 */
-	function getDefaultView(&$controller,&$xoopsUser)
-	{
-		$id=isset($_REQUEST['id']) ? intval($_REQUEST['id']) : 0;
-		
-		$paramaters=array("id"=>$id);
-		$comment=&$this->mClient->call("getComment",$pamaraters);
-
-		if(is_object($comment)) {
-			$this->mComment=&$comment;
-			return COMMENT_FRAME_VIEW_INPUT;
-		}
-		
-		return COMMENT_FRAME_VIEW_ERROR;
-	}
-	
-	function execute()
-	{
-		$id = intval($_REQUEST["id"]);
-		$deleteAllFlag = intval($_REQUEST["DeleteAll"])==1 ? true : false;
-
-		//
-		// TODO We check a permission that user can delete this comment.
-		//
-
-		$parameters=array('Id'=>$id);
-		if($deleteAllFlag) {
-			$result=&$this->mClient->call("Delete",$parameters);
-		}
-		else {
-			$result=&$this->mClient->call("DeleteAll",$parameters);
-		}
-		
-		return COMMENT_FRAME_VIEW_SUCCESS;
-	}
-	
-	function executeViewSuccess(&$controller,&$xoopsUser,&$renderSystem)
-	{
-		XCube_Utils::redirectHeader(XOOPS_URL,1,"delete!");
-	}
-
-	function executeViewInput(&$controller,&$xoopsUser,&$renderSystem)
-	{
-		$renderSystem->setTemplateName("comment_delete_input.html");
-		$renderSystem->setAttribute("comment",$this->mComment);
-	}
-}
-
-?>
\ No newline at end of file


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