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

Back to archive index

Minahito minah****@users*****
2005年 12月 16日 (金) 18:49:31 JST


Index: xoops2jp/html/modules/base/admin/actions/AbstractModuleInstallAction.class.php
diff -u /dev/null xoops2jp/html/modules/base/admin/actions/AbstractModuleInstallAction.class.php:1.1.2.1
--- /dev/null	Fri Dec 16 18:49:31 2005
+++ xoops2jp/html/modules/base/admin/actions/AbstractModuleInstallAction.class.php	Fri Dec 16 18:49:31 2005
@@ -0,0 +1,60 @@
+<?php
+/**
+ * @version
+ */
+
+/**
+ * This is abstract class for 3 action classes that are Install, Update and Uninstall.
+ */
+class Legacy_AbstractModuleInstallAction extends LegacyAdminAction
+{
+	/**
+	 * XoopsModule instance specified.
+	 */
+	var $mModuleObject = null;
+	var $mLog = null;
+
+	function getDefaultView(&$controller, &$xoopsUser)
+	{
+		$dirname = trim($_GET['dirname']);
+
+		$installer =& $this->_getInstaller($dirname);
+
+		$this->mModuleObject =& $installer->loadModuleObject($dirname);
+
+		if (!is_object($this->mModuleObject)) {
+			return LEGACY_ADMIN_FRAME_VIEW_ERROR;
+		}
+
+		$this->mModuleObject->loadAdminMenu();
+		$this->mModuleObject->loadInfo($dirname);
+
+		return LEGACY_ADMIN_FRAME_VIEW_INPUT;
+	}
+
+	function execute(&$controller, &$xoopsUser)
+	{
+		$dirname = trim($_POST['dirname']);
+
+		$force=false;
+		if(isset($_POST['force']))
+			$force=intval($_POST['force'])>0 ? true : false;
+
+		$installer =& $this->_getInstaller($dirname);
+		$installer->setForceMode($force);
+		$installer->execute($dirname);
+
+		$this->mLog =& $installer->getLog();
+		
+		return LEGACY_ADMIN_FRAME_VIEW_SUCCESS;
+	}
+
+	/**
+	 * Return a procedure for this process.
+	 */
+	function &_getInstaller($dirname)
+	{
+	}
+}
+
+?>
\ No newline at end of file


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