[xoops-cvslog 3409] CVS update: xoops2jp/html/modules/pm/actions

Back to archive index

Minahito minah****@users*****
2006年 7月 4日 (火) 18:46:44 JST


Index: xoops2jp/html/modules/pm/actions/DefaultAction.class.php
diff -u /dev/null xoops2jp/html/modules/pm/actions/DefaultAction.class.php:1.1.2.1
--- /dev/null	Tue Jul  4 18:46:44 2006
+++ xoops2jp/html/modules/pm/actions/DefaultAction.class.php	Tue Jul  4 18:46:44 2006
@@ -0,0 +1,60 @@
+<?php
+/**
+ * @package Pm
+ * @version $Id: DefaultAction.class.php,v 1.1.2.1 2006/07/04 09:46:44 minahito Exp $
+ */
+
+if (!defined('XOOPS_ROOT_PATH')) exit();
+
+require_once XOOPS_ROOT_PATH . "/class/XCube_PageNavigator.class.php";
+require_once XOOPS_MODULE_PATH . "/pm/forms/PmDeleteForm.class.php";
+
+/**
+ * [Notice]
+ * This class has been checked in Alpha4. But, this class doesn't go along the
+ * latest cubson style. And some problems (using core handler, naming rule and
+ * etc) are there. Pm module is one of the most old code in Legacy.
+ * 
+ * [ToDo]
+ * This class should use Action_FilterForm as well as other latest modules.
+ */
+class Pm_DefaultAction extends Pm_AbstractAction
+{
+	var $mActionForm = null;
+	
+	var $mPmObjects = array();
+	
+	var $mPageNavi = null;
+	
+	function prepare(&$controller, &$xoopsUser, &$moduleConfig)
+	{
+		$this->mActionForm =& new Pm_PmDeleteForm();
+		$this->mActionForm->prepare();
+	}
+	
+	function getDefaultView(&$controller, &$xoopsUser)
+	{
+		$pmHandler =& xoops_gethandler('privmessage');
+		$total = $pmHandler->getCountByFromUid($xoopsUser->uid());
+
+		$this->mPageNavi =& new XCube_PageNavigator("./index.php", $total, XCUBE_PAGENAVI_START);
+		$this->mPageNavi->fetch();
+
+		$this->mPmObjects =& $pmHandler->getObjectsByFromUid($xoopsUser->uid(), $this->mPageNavi->getStart());
+
+		return PM_FRAME_VIEW_INDEX;
+	}
+
+	function executeViewIndex(&$controller, &$xoopsUser, &$render)
+	{
+		$render->setTemplateName("viewpmsg.html");
+		$render->setAttribute("pmObjects", $this->mPmObjects);
+		$render->setAttribute("total_messages", count($this->mPmObjects));
+		$render->setAttribute("currentUser", $xoopsUser);
+		$render->setAttribute("anonymous", $controller->getConfig('anonymous'));
+		$render->setAttribute("pageNavi", $this->mPageNavi);
+		$render->setAttribute("actionForm", $this->mActionForm);
+	}
+}
+
+?>
\ No newline at end of file


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