Minahito
minah****@users*****
2006年 7月 26日 (水) 19:54:02 JST
Index: xoops2jp/html/modules/base/class/ActionFrame.class.php diff -u xoops2jp/html/modules/base/class/ActionFrame.class.php:1.1.2.7 xoops2jp/html/modules/base/class/ActionFrame.class.php:1.1.2.8 --- xoops2jp/html/modules/base/class/ActionFrame.class.php:1.1.2.7 Fri Jun 23 10:28:54 2006 +++ xoops2jp/html/modules/base/class/ActionFrame.class.php Wed Jul 26 19:54:02 2006 @@ -14,12 +14,27 @@ define ("LEGACY_FRAME_VIEW_INDEX", 4); define ("LEGACY_FRAME_VIEW_INPUT", 5); +// +// Constatns for the mode of the frame. +// +define ("LEGACY_FRAME_MODE_MISC", "Misc"); +define ("LEGACY_FRAME_MODE_NOTIFY", "Notify"); +define ("LEGACY_FRAME_MODE_IMAGE", "Image"); + class Legacy_ActionFrame extends XCube_ActionStrategy { var $mActionName = null; var $mAction = null; var $mAdminFlag = null; + /** + * Mode. The rule refers this property to load a file and create an + * instance in execute(). + * + * @var string + */ + var $mMode = null; + function Legacy_ActionFrame($admin) { $this->mAdminFlag = $admin; @@ -29,12 +44,27 @@ { $this->mActionName = $name; } + + /** + * Set mode. + * + * @param string $mode Use constants (LEGACY_FRAME_MODE_MISC and more...) + */ + function setMode($mode) + { + $this->mMode = $mode; + } function execute(&$controller) { if (!preg_match("/^\w+$/", $this->mActionName)) { die(); } + + // + // Add mode. + // + $this->mActionName = $this->mMode . $this->mActionName; // // Create action object by mActionName