Skip to content

Commit

Permalink
do not use WikiHelper on The custom block edit
Browse files Browse the repository at this point in the history
カスタムブロックは、htmlが有効のため、xpWiki レンダラーが効かないので、Wikiヘルパーを表示しないようにした。
  • Loading branch information
nao-pon committed Dec 18, 2012
1 parent ab4fd7a commit 713ab1b
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions xoops_trust_path/class/hyp_common/preload/hyp_preload.php
Original file line number Diff line number Diff line change
Expand Up @@ -572,11 +572,19 @@ function BBCode_wiki_render(&$html, $element) {

function postFilter() {

// <xoops_dhtmltarea editor=bbcode>
if (XPWIKI_RENDERER_USE_WIKIHELPER_BBCODE && defined('LEGACY_BASE_VERSION') && version_compare(LEGACY_BASE_VERSION, '2.2', '>=')) {
$this->mRoot->mDelegateManager->reset('Site.TextareaEditor.BBCode.Show');
$this->mRoot->mDelegateManager->add('Site.TextareaEditor.BBCode.Show',array(&$this, 'BBCode_wiki_render'));
}
// <xoops_dhtmltarea editor=bbcode>
if (XPWIKI_RENDERER_USE_WIKIHELPER_BBCODE && defined('LEGACY_BASE_VERSION') && version_compare(LEGACY_BASE_VERSION, '2.2', '>=')) {
if ( ! $this->mRoot->mContext->mUser->isInRole('Site.Administrator')
|| (
strpos($_SERVER['REQUEST_URI'], 'action=CustomBlockEdit') === false
&&
strpos($_SERVER['REQUEST_URI'], '__CustomBlocks__&op=edit') === false
)
) {
$this->mRoot->mDelegateManager->reset('Site.TextareaEditor.BBCode.Show');
$this->mRoot->mDelegateManager->add('Site.TextareaEditor.BBCode.Show',array(&$this, 'BBCode_wiki_render'));
}
}

if (defined('HYP_COMMON_SKIP_POST_FILTER')) return;

Expand Down

0 comments on commit 713ab1b

Please sign in to comment.