[xoops-cvslog 2134] CVS update: xoops2jp/html/modules/base/class

Zurück zum Archiv-Index

Minahito minah****@users*****
2006年 2月 3日 (金) 02:02:45 JST


Index: xoops2jp/html/modules/base/class/MiscActionFrame.class.php
diff -u xoops2jp/html/modules/base/class/MiscActionFrame.class.php:1.1.2.2 xoops2jp/html/modules/base/class/MiscActionFrame.class.php:removed
--- xoops2jp/html/modules/base/class/MiscActionFrame.class.php:1.1.2.2	Mon Dec 26 20:23:58 2005
+++ xoops2jp/html/modules/base/class/MiscActionFrame.class.php	Fri Feb  3 02:02:45 2006
@@ -1,151 +0,0 @@
-<?php
-// $Id: MiscActionFrame.class.php,v 1.1.2.2 2005/12/26 11:23:58 minahito Exp $
-//  ------------------------------------------------------------------------ //
-//                XOOPS - PHP Content Management System                      //
-//                  Copyright (c) 2005 XOOPS Cube.org                        //
-//                     <http://www.xoopscube.org/>                           //
-//  ------------------------------------------------------------------------ //
-//  This program is free software; you can redistribute it and/or modify     //
-//  it under the terms of the GNU General Public License as published by     //
-//  the Free Software Foundation; either version 2 of the License, or        //
-//  (at your option) any later version.                                      //
-//                                                                           //
-//  You may not change or alter any portion of this comment or credits       //
-//  of supporting developers from this source code or any supporting         //
-//  source code which is considered copyrighted (c) material of the          //
-//  original comment or credit authors.                                      //
-//                                                                           //
-//  This program is distributed in the hope that it will be useful,          //
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
-//  GNU General Public License for more details.                             //
-//                                                                           //
-//  You should have received a copy of the GNU General Public License        //
-//  along with this program; if not, write to the Free Software              //
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
-//  ------------------------------------------------------------------------ //
-
-require_once XOOPS_ROOT_PATH."/class/XCube_ActionStrategy.class.php";
-
-define ("MISC_FRAME_PERFORM_SUCCESS",1);
-define ("MISC_FRAME_PERFORM_FAIL",2);
-define ("MISC_FRAME_INIT_SUCCESS",3);
-
-define ("MISC_FRAME_VIEW_NONE",1);
-define ("MISC_FRAME_VIEW_SUCCESS",1);
-define ("MISC_FRAME_VIEW_ERROR",2);
-define ("MISC_FRAME_VIEW_INDEX",3);
-
-/**
- * This is simple frame work for misc page controller.
- * @package base
- */
-class MiscActionFrame extends XCube_ActionStrategy
-{
-	var $mActionName = null;
-	var $mAction;
-	
-	function MiscActionFrame()
-	{
-	}
-	
-	function execute(&$controller)
-	{
-		if($this->mActionName==null) {
-			$this->mActionName = isset($_REQUEST['type']) ? $_REQUEST['type'] : "";
-		}
-
-		if(!preg_match("/^\w+$/",$this->mActionName)) {
-			die();
-		}
-
-		$langManager =& $controller->mRoot->getLanguageManager();
-		$langManager->loadModuleLanguage("base");
-
-		//
-		// Create action object by mActionName
-		//
-		$className="Misc_".ucfirst($this->mActionName)."Action";
-		$fileName=XOOPS_MODULE_PATH."/base/actions/${className}.class.php";
-
-		if(!file_exists($fileName))
-			die();	// TODO
-		
-		require_once $fileName;
-		if(class_exists($className))
-				$this->mAction=new $className();
-		
-		if(!is_object($this->mAction))
-			die();	// TODO
-
-		$this->mAction->prepare($controller,$controller->getXoopsUser());
-		
-		if(xoops_getenv("REQUEST_METHOD")=="POST") {
-			$viewStatus=$this->mAction->execute($controller,$controller->getXoopsUser());
-		}
-		else {
-			$viewStatus=$this->mAction->getDefaultView($controller,$controller->getXoopsUser());
-		}
-		
-		switch($viewStatus) {
-			case MISC_FRAME_VIEW_SUCCESS:
-				$this->mAction->executeViewSuccess($controller,$controller->getXoopsUser(),$controller->mRenderSystem);
-				break;
-			
-			case MISC_FRAME_VIEW_ERROR:
-				$this->mAction->executeViewError($controller,$controller->getXoopsUser(),$controller->mRenderSystem);
-				break;
-			
-			case MISC_FRAME_VIEW_INDEX:
-				$this->mAction->executeViewIndex($controller,$controller->getXoopsUser(),$controller->mRenderSystem);
-				break;
-
-			case MISC_FRAME_VIEW_INPUT:
-				$this->mAction->executeViewInput($controller,$controller->getXoopsUser(),$controller->mRenderSystem);
-				break;
-		}
-	}
-}
-
-class MiscAction
-{
-	function MiscAction()
-	{
-	}
-
-	function prepare(&$controller,&$xoopsUser)
-	{
-	}
-
-	/**
-	 * @param $controller Base_Controller
-	 * @param $xoopsUser XoopsUserObject
-	 */
-	function getDefaultView(&$controller,&$xoopsUser)
-	{
-		return USER_FRAME_VIEW_NONE;
-	}
-	
-	function execute()
-	{
-		return USER_FRAME_VIEW_NONE;
-	}
-	
-	function executeViewSuccess(&$controller,&$xoopsUser,&$renderSystem)
-	{
-	}
-
-	function executeViewError(&$controller,&$xoopsUser,&$renderSystem)
-	{
-	}
-
-	function executeViewIndex(&$controller,&$xoopsUser,&$renderSystem)
-	{
-	}
-
-	function executeViewInput(&$controller,&$xoopsUser,&$renderSystem)
-	{
-	}
-}
-
-?>
\ No newline at end of file


xoops-cvslog メーリングリストの案内
Zurück zum Archiv-Index