NobuNobu
nobun****@users*****
2007年 4月 30日 (月) 16:37:04 JST
Index: xoops2jp/html/modules/pm/preload/Preload.class.php diff -u /dev/null xoops2jp/html/modules/pm/preload/Preload.class.php:1.1.4.1 --- /dev/null Mon Apr 30 16:37:04 2007 +++ xoops2jp/html/modules/pm/preload/Preload.class.php Mon Apr 30 16:37:04 2007 @@ -0,0 +1,98 @@ +<?php + +if (!defined('XOOPS_ROOT_PATH')) die(); + +class Pm_Preload extends XCube_ActionFilter +{ + function preBlockFilter() + { + require_once XOOPS_MODULE_PATH . "/pm/service/Service.class.php"; + $service =& new Pm_Service(); + $service->prepare(); + + $this->mRoot->mServiceManager->addService('privateMessage', $service); + + $root =& XCube_Root::getSingleton(); + $root->mDelegateManager->add('Legacypage.Viewpmsg.Access', "Pm_Preload::accessToViewpmsg"); + $root->mDelegateManager->add('Legacypage.Readpmsg.Access', "Pm_Preload::accessToReadpmsg"); + $root->mDelegateManager->add('Legacypage.Pmlite.Access', "Pm_Preload::accessToPmlite"); + } + + function accessToReadpmsg() + { + // + // Boot the action frame of the user module directly. + // + $root =& XCube_Root::getSingleton(); + $root->mController->executeHeader(); + + $root->mController->setupModuleContext('pm'); + $root->mLanguageManager->loadModuleMessageCatalog('pm'); + + require_once XOOPS_MODULE_PATH . "/pm/class/ActionFrame.class.php"; + + $actionName = xoops_getrequest('action') == 'DeleteOne' ? 'DeleteOne' : 'read'; + + $moduleRunner =& new Pm_ActionFrame(false); + $moduleRunner->setActionName($actionName); + + $root->mController->mExecute->add(array(&$moduleRunner, 'execute')); + + $root->mController->execute(); + + $root->mController->executeView(); + } + + function accessToViewpmsg() + { + // + // Boot the action frame of the user module directly. + // + $root =& XCube_Root::getSingleton(); + $root->mController->executeHeader(); + + $root->mController->setupModuleContext('pm'); + $root->mLanguageManager->loadModuleMessageCatalog('pm'); + + require_once XOOPS_MODULE_PATH . "/pm/class/ActionFrame.class.php"; + + $actionName = xoops_getrequest('action') == 'delete' ? 'delete' : 'default'; + + $moduleRunner =& new Pm_ActionFrame(false); + $moduleRunner->setActionName($actionName); + + $root->mController->mExecute->add(array(&$moduleRunner, 'execute')); + + $root->mController->execute(); + + $root->mController->executeView(); + } + + function accessToPmlite() + { + // + // Boot the action frame of the user module directly. + // + $root =& XCube_Root::getSingleton(); + $root->mController->executeHeader(); + + $root->mController->setupModuleContext('pm'); + $root->mLanguageManager->loadModuleMessageCatalog('pm'); + + $root->mController->setDialogMode(true); + + require_once XOOPS_MODULE_PATH . "/pm/class/ActionFrame.class.php"; + + $moduleRunner =& new Pm_ActionFrame(false); + $moduleRunner->setActionName('pmlite'); + + $root->mController->mExecute->add(array(&$moduleRunner, 'execute')); + + $root->mController->execute(); + + $root->mController->executeView(); + } + +} + +?> \ No newline at end of file Index: xoops2jp/html/modules/pm/preload/index.html diff -u /dev/null xoops2jp/html/modules/pm/preload/index.html:1.1.4.1 --- /dev/null Mon Apr 30 16:37:04 2007 +++ xoops2jp/html/modules/pm/preload/index.html Mon Apr 30 16:37:04 2007 @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file