Minahito
minah****@users*****
2006年 8月 1日 (火) 19:31:27 JST
Index: xoops2jp/html/modules/base/admin/actions/HelpAction.class.php diff -u xoops2jp/html/modules/base/admin/actions/HelpAction.class.php:1.1.2.10 xoops2jp/html/modules/base/admin/actions/HelpAction.class.php:1.1.2.11 --- xoops2jp/html/modules/base/admin/actions/HelpAction.class.php:1.1.2.10 Mon Jul 31 19:32:51 2006 +++ xoops2jp/html/modules/base/admin/actions/HelpAction.class.php Tue Aug 1 19:31:27 2006 @@ -1,17 +1,37 @@ <?php /** - * @version $Id: HelpAction.class.php,v 1.1.2.10 2006/07/31 10:32:51 minahito Exp $ + * @package Legacy + * @version $Id: HelpAction.class.php,v 1.1.2.11 2006/08/01 10:31:27 minahito Exp $ */ if (!defined('XOOPS_ROOT_PATH')) exit(); /** - * This class extends Smarty to mediate the collision compiled file name. + * The sub-class of smarty for help viewer, make it possible to use smarty in + * help html file. This class extends Smarty to mediate the collision compiled + * file name. + * + * To support help view, there are some original modifiers. + * + * 'helpurl' modify a relativity URL for connecting the dynamic page link. + * 'helpimage' modify a image URL. These modifiers consider the existence of + * language files. */ class Legacy_HelpSmarty extends Smarty { + /** + * @var string + */ var $mDirname = null; + + /** + * @var XoopsModule + */ var $mModuleObject = null; + + /** + * @var string + */ var $mFilename = null; function Legacy_HelpSmarty() @@ -50,7 +70,7 @@ $moduleObject =& $modController->getXoopsModule(); $language = $root->mController->getConfig('language'); - $dirname = $moduleObject->getVar('dirname'); + $dirname = $moduleObject->get('dirname'); // // TODO We should check file_exists. @@ -68,7 +88,7 @@ $moduleObject =& $modController->getXoopsModule(); $language = $root->mController->getConfig('language'); - $dirname = $moduleObject->getVar('dirname'); + $dirname = $moduleObject->get('dirname'); $url = XOOPS_MODULE_URL . "/${dirname}/language/${language}/help/images/${file}"; if (!file_exists($url) && $language != "english") { @@ -141,6 +161,8 @@ // // file check // + // TODO We should not access files in language directory directly. + // $template_dir = XOOPS_MODULE_PATH . "/" . $this->_mDirname . "/language/${language}/help"; if (!file_exists($template_dir . "/" . $helpfile)) { $template_dir = XOOPS_MODULE_PATH . "/" . $this->_mDirname . "/language/english/help";