[xoops-cvslog 2635] CVS update: xoops2jp/html/modules/base/admin/actions

Back to archive index

Minahito minah****@users*****
2006年 4月 5日 (水) 19:57:52 JST


Index: xoops2jp/html/modules/base/admin/actions/BlockInstallEditAction.class.php
diff -u /dev/null xoops2jp/html/modules/base/admin/actions/BlockInstallEditAction.class.php:1.1.2.1
--- /dev/null	Wed Apr  5 19:57:52 2006
+++ xoops2jp/html/modules/base/admin/actions/BlockInstallEditAction.class.php	Wed Apr  5 19:57:52 2006
@@ -0,0 +1,35 @@
+<?php
+
+if (!defined('XOOPS_ROOT_PATH')) exit();
+
+require_once dirname(__FILE__) . "/BlockEditAction.class.php";
+
+require_once XOOPS_MODULE_PATH . "/base/class/AbstractEditAction.class.php";
+require_once XOOPS_MODULE_PATH . "/base/admin/forms/BlockInstallEditForm.class.php";
+
+class Legacy_BlockInstallEditAction extends Legacy_BlockEditAction
+{
+	function _setupActionForm()
+	{
+		$this->mActionForm =& new Legacy_BlockInstallEditForm();
+		$this->mActionForm->prepare();
+	}
+	
+	function executeViewInput(&$controller, &$xoopsUser, &$render)
+	{
+		parent::executeViewInput($controller, $xoopsUser, $render);
+		$render->setTemplateName("blockinstall_edit.html");
+	}
+	
+	function executeViewSuccess(&$controller, &$xoopsUser, &$render)
+	{
+		$controller->executeForward("./index.php?action=BlockInstallList");
+	}
+
+	function executeViewError(&$controller, &$xoopsUser, &$render)
+	{
+		redirect_header("./index.php?action=BlockInstallList", 1, _AD_BASE_ERROR_DBUPDATE_FAILED);
+	}
+}
+
+?>
Index: xoops2jp/html/modules/base/admin/actions/BlockUninstallAction.class.php
diff -u /dev/null xoops2jp/html/modules/base/admin/actions/BlockUninstallAction.class.php:1.1.2.1
--- /dev/null	Wed Apr  5 19:57:52 2006
+++ xoops2jp/html/modules/base/admin/actions/BlockUninstallAction.class.php	Wed Apr  5 19:57:52 2006
@@ -0,0 +1,51 @@
+<?php
+
+if (!defined('XOOPS_ROOT_PATH')) exit();
+
+require_once XOOPS_MODULE_PATH . "/base/class/AbstractEditAction.class.php";
+require_once XOOPS_MODULE_PATH . "/base/admin/forms/BlockUninstallForm.class.php";
+
+class Legacy_BlockUninstallAction extends Legacy_AbstractEditAction
+{
+	function _getId()
+	{
+		return isset($_REQUEST['bid']) ? $_REQUEST['bid'] : 0;
+	}
+
+	function &_getHandler()
+	{
+		$handler =& xoops_getmodulehandler('newblocks');
+		return $handler;
+	}
+
+	function _setupActionForm()
+	{
+		$this->mActionForm =& new Legacy_BlockUninstallForm();
+		$this->mActionForm->prepare();
+	}
+
+	function executeViewInput(&$controller, &$xoopsUser, &$render)
+	{
+		$render->setTemplateName("block_uninstall.html");
+		$render->setAttribute('actionForm', $this->mActionForm);
+		
+		//
+		// lazy loading
+		//
+		$this->mObject->loadModule();
+		
+		$render->setAttribute('object', $this->mObject);
+	}
+
+	function executeViewSuccess(&$controller, &$xoopsUser, &$render)
+	{
+		$controller->executeForward("./index.php?action=BlockList");
+	}
+
+	function executeViewError(&$controller, &$xoopsUser, &$render)
+	{
+		redirect_header("./index.php?action=BlockList", 1, _AD_BASE_ERROR_DBUPDATE_FAILED);
+	}
+}
+
+?>
Index: xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php
diff -u /dev/null xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php:1.1.2.1
--- /dev/null	Wed Apr  5 19:57:52 2006
+++ xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php	Wed Apr  5 19:57:52 2006
@@ -0,0 +1,93 @@
+<?php
+
+if (!defined('XOOPS_ROOT_PATH')) exit();
+
+require_once XOOPS_MODULE_PATH . "/base/class/AbstractEditAction.class.php";
+require_once XOOPS_MODULE_PATH . "/base/admin/forms/BlockEditForm.class.php";
+
+class Legacy_BlockEditAction extends Legacy_AbstractEditAction
+{
+	/**
+	 * @var string
+	 */
+	var $_mOptionForm = null;
+	
+	function _getId()
+	{
+		return isset($_REQUEST['bid']) ? $_REQUEST['bid'] : 0;
+	}
+
+	function &_getHandler()
+	{
+		$handler =& xoops_getmodulehandler('newblocks');
+		return $handler;
+	}
+
+	function _setupActionForm()
+	{
+		$this->mActionForm =& new Legacy_BlockEditForm();
+		$this->mActionForm->prepare();
+	}
+	
+	function executeViewInput(&$controller, &$xoopsUser, &$render)
+	{
+		$render->setTemplateName("block_edit.html");
+		$render->setAttribute('actionForm', $this->mActionForm);
+		
+		//
+		// lazy loading
+		//
+		$this->mObject->loadModule();
+		
+		$render->setAttribute('object', $this->mObject);
+
+		$handler =& xoops_gethandler('module');
+		$moduleArr =& $handler->getObjects();
+		$render->setAttribute('moduleArr', $moduleArr);
+		
+		$handler =& xoops_getmodulehandler('columnside');
+		$columnSideArr =& $handler->getObjects();
+		$render->setAttribute('columnSideArr', $columnSideArr);
+
+		$handler =& xoops_gethandler('group');
+		$groupArr =& $handler->getObjects();
+		$render->setAttribute('groupArr', $groupArr);
+		
+		//
+		// Get html of option form rendered.
+		//
+		if ($this->mObject->get('func_file') && $this->mObject->get('edit_func')) {
+			$func_file = XOOPS_MODULE_PATH . "/" . $this->mObject->get('dirname') . "/blocks/" . $this->mObject->get('func_file');
+			if (file_exists($func_file)) {
+				require $func_file;
+				$edit_func = $this->mObject->get('edit_func');
+				
+				$options = explode('|', $this->mObject->get('options'));
+				
+				if (function_exists($edit_func)) {
+					//
+					// load language file.
+					//
+					$root =& XCube_Root::getSingleton();
+					$langManager =& $root->getLanguageManager();
+					$langManager->loadBlockLanguage($this->mObject->get('dirname'));
+					
+					$this->_mOptionForm = call_user_func($edit_func, $options);
+				}
+			}
+		}
+		$render->setAttribute('optionForm', $this->_mOptionForm);
+	}
+
+	function executeViewSuccess(&$controller, &$xoopsUser, &$render)
+	{
+		$controller->executeForward("./index.php?action=BlockList");
+	}
+
+	function executeViewError(&$controller, &$xoopsUser, &$render)
+	{
+		redirect_header("./index.php?action=BlockList", 1, _AD_BASE_ERROR_DBUPDATE_FAILED);
+	}
+}
+
+?>
Index: xoops2jp/html/modules/base/admin/actions/BlockListAction.class.php
diff -u /dev/null xoops2jp/html/modules/base/admin/actions/BlockListAction.class.php:1.1.2.1
--- /dev/null	Wed Apr  5 19:57:52 2006
+++ xoops2jp/html/modules/base/admin/actions/BlockListAction.class.php	Wed Apr  5 19:57:52 2006
@@ -0,0 +1,41 @@
+<?php
+
+if (!defined('XOOPS_ROOT_PATH')) exit();
+
+require_once XOOPS_MODULE_PATH . "/base/class/PageNavigator.class.php";
+require_once XOOPS_MODULE_PATH . "/base/class/AbstractListAction.class.php";
+require_once XOOPS_MODULE_PATH . "/base/admin/forms/BlockFilterForm.class.php";
+
+class Legacy_BlockListAction extends Legacy_AbstractListAction
+{
+	function &_getHandler()
+	{
+		$handler =& xoops_getmodulehandler('newblocks');
+		return $handler;
+	}
+
+	function &_getFilterForm(&$navi)
+	{
+		$filter =& new Legacy_BlockFilterForm($navi);
+		return $filter;
+	}
+
+	function _getBaseUrl()
+	{
+		return "./index.php?action=NewblocksList";
+	}
+
+	function executeViewIndex(&$controller, &$xoopsUser, &$render)
+	{
+		$render->setTemplateName("block_list.html");
+		#cubson::lazy_load_array('newblocks', $this->mObjects);
+		foreach (array_keys($this->mObjects) as $key) {
+			$this->mObjects[$key]->loadModule();
+		}
+		
+		$render->setAttribute("objects", $this->mObjects);
+		$render->setAttribute("pageNavi", $this->mNavi);
+	}
+}
+
+?>
Index: xoops2jp/html/modules/base/admin/actions/BlockInstallListAction.class.php
diff -u /dev/null xoops2jp/html/modules/base/admin/actions/BlockInstallListAction.class.php:1.1.2.1
--- /dev/null	Wed Apr  5 19:57:52 2006
+++ xoops2jp/html/modules/base/admin/actions/BlockInstallListAction.class.php	Wed Apr  5 19:57:52 2006
@@ -0,0 +1,44 @@
+<?php
+
+if (!defined('XOOPS_ROOT_PATH')) exit();
+
+require_once XOOPS_MODULE_PATH . "/base/class/PageNavigator.class.php";
+require_once XOOPS_MODULE_PATH . "/base/class/AbstractListAction.class.php";
+require_once XOOPS_MODULE_PATH . "/base/admin/forms/BlockInstallFilterForm.class.php";
+
+class Legacy_BlockInstallListAction extends Legacy_AbstractListAction
+{
+	function &_getHandler()
+	{
+		$handler =& xoops_getmodulehandler('newblocks');
+		return $handler;
+	}
+
+	function &_getFilterForm(&$navi)
+	{
+		$filter =& new Legacy_BlockInstallFilterForm($navi);
+		return $filter;
+	}
+
+	function _getBaseUrl()
+	{
+		return "./index.php?action=BlockInstallList";
+	}
+
+	function executeViewIndex(&$controller, &$xoopsUser, &$render)
+	{
+		$render->setTemplateName("blockinstall_list.html");
+
+		//
+		// Lazy load
+		//
+		foreach (array_keys($this->mObjects) as $key) {
+			$this->mObjects[$key]->loadModule();
+		}
+		
+		$render->setAttribute("objects", $this->mObjects);
+		$render->setAttribute("pageNavi", $this->mNavi);
+	}
+}
+
+?>


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