[xoops-cvslog 6160] CVS update: xoops2jp/html/modules/legacy/preload

Back to archive index

Minahito minah****@users*****
2007年 2月 16日 (金) 15:35:48 JST


Index: xoops2jp/html/modules/legacy/preload/InstallerChecker.class.php
diff -u /dev/null xoops2jp/html/modules/legacy/preload/InstallerChecker.class.php:1.1.2.1
--- /dev/null	Fri Feb 16 15:35:48 2007
+++ xoops2jp/html/modules/legacy/preload/InstallerChecker.class.php	Fri Feb 16 15:35:48 2007
@@ -0,0 +1,46 @@
+<?php
+/**
+ * @package Legacy
+ * @version $Id: InstallerChecker.class.php,v 1.1.2.1 2007/02/16 06:35:48 minahito Exp $
+ * @copyright Copyright 2005, 2006 XOOPS Cube Project <http://xoopscube.org/>
+ * @license http://xoopscube.sourceforge.net/bsd_licenses.txt Modified BSD license
+ */
+
+if (!defined('XOOPS_ROOT_PATH')) exit();
+
+if (!defined("LEGACY_INSTALLERCHECKER_ACTIVE"))
+	define("LEGACY_INSTALLERCHECKER_ACTIVE", true);
+
+/**
+ * This filter checks whether the install-wizard directory is removed.
+ * If it is not removed yet, this filter warns to remove the install-wizard
+ * directory.
+ */
+class Legacy_InstallerChecker extends XCube_ActionFilter
+{
+    function preBlockFilter()
+    {
+    	if (LEGACY_INSTALLERCHECKER_ACTIVE == true && is_dir(XOOPS_ROOT_PATH . "/install"))
+    	{
+    		$root =& XCube_Root::getSingleton();
+    		$root->mLanguageManager->loadModuleMessageCatalog('legacy');
+    		$xoopsConfig = $root->mContext->mXoopsConfig;
+    		
+			require_once XOOPS_ROOT_PATH . '/class/template.php';
+			$xoopsTpl =& new XoopsTpl();
+			$xoopsTpl->assign(array('xoops_sitename' => htmlspecialchars($xoopsConfig['sitename']),
+									   'xoops_themecss' => xoops_getcss(),
+									   'xoops_imageurl' => XOOPS_THEME_URL . '/' . $xoopsConfig['theme_set'] . '/',
+									   'lang_message' => XCube_Utils::formatMessage(_MD_LEGACY_MESSAGE_INSTALL_COMPLETE, XOOPS_ROOT_PATH . "/install")
+									   ));
+									   
+			$xoopsTpl->compile_check = true;
+			
+			// @todo filebase template with absolute file path
+			$xoopsTpl->display(XOOPS_ROOT_PATH . '/modules/legacy/templates/legacy_install_completed.html');
+			exit();
+    	}
+    }
+}
+
+?>
\ No newline at end of file


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