diff --git a/config_defaults_inc.php b/config_defaults_inc.php --- a/config_defaults_inc.php +++ b/config_defaults_inc.php @@ -3782,7 +3782,7 @@ /** * Wiki Engine. - * Supported engines: 'dokuwiki', 'mediawiki', 'twiki', 'wikka', 'xwiki' + * Supported engines: 'dokuwiki', 'mediawiki', 'twiki', 'wackowiki', 'wikka', 'xwiki' * @global string $g_wiki_engine */ $g_wiki_engine = ''; diff --git a/core/classes/MantisCoreWikiPlugin.class.php b/core/classes/MantisCoreWikiPlugin.class.php --- a/core/classes/MantisCoreWikiPlugin.class.php +++ b/core/classes/MantisCoreWikiPlugin.class.php @@ -218,6 +218,65 @@ } /** + * Basic WackoWiki support with old-style wiki integration. + */ +class MantisCoreWackowikiPlugin extends MantisCoreWikiPlugin { + /** + * Plugin Registration + * @return void + */ + function register() { + $this->name = 'MantisBT WackoWiki Integration'; + $this->version = '0.1'; + $this->requires = array( + 'MantisCore' => '2.0.0', + ); + } + + /** + * Wiki base url + * + * @param integer $p_project_id A project identifier. + * @return string + */ + function base_url( $p_project_id = null ) { + $t_base = plugin_config_get( 'engine_url' ) . ''; + + $t_namespace = ucfirst( plugin_config_get( 'root_namespace' ) ); + if( !is_blank( $t_namespace ) ) { + $t_base .= urlencode( $t_namespace ) . '/'; + } + + if( !is_null( $p_project_id ) && $p_project_id != ALL_PROJECTS ) { + $t_base .= urlencode( project_get_name( $p_project_id ) ) . '/'; + } + return $t_base; + } + + /** + * Wiki link to a bug + * + * @param integer $p_event Event. + * @param integer $p_bug_id A bug identifier. + * @return string + */ + function link_bug( $p_event, $p_bug_id ) { + return $this->base_url( bug_get_field( $p_bug_id, 'project_id' ) ) . 'Issue' . (int)$p_bug_id; + } + + /** + * Wiki link to a project + * + * @param integer $p_event Event. + * @param integer $p_project_id A project identifier. + * @return string + */ + function link_project( $p_event, $p_project_id ) { + return $this->base_url( $p_project_id ) . ''; + } +} + +/** * Basic WikkaWiki support with old-style wiki integration. */ class MantisCoreWikkaWikiPlugin extends MantisCoreWikiPlugin { diff --git a/core/wiki_api.php b/core/wiki_api.php --- a/core/wiki_api.php +++ b/core/wiki_api.php @@ -70,6 +70,9 @@ case 'twiki': plugin_child( 'MantisCoreTwiki' ); break; + case 'wackowiki': + plugin_child( 'MantisCoreWackowiki' ); + break; case 'WikkaWiki': plugin_child( 'MantisCoreWikkaWiki' ); break; diff --git a/doc/en-US/Admin_Guide/Admin_Guide.txt b/doc/en-US/Admin_Guide/Admin_Guide.txt --- a/doc/en-US/Admin_Guide/Admin_Guide.txt +++ b/doc/en-US/Admin_Guide/Admin_Guide.txt @@ -3802,6 +3802,8 @@ * twiki: TWiki + * wackowiki: WackoWiki + * wikka: WikkaWiki * xwiki: XWiki diff --git a/doc/en-US/Admin_Guide/html-desktop/index.html b/doc/en-US/Admin_Guide/html-desktop/index.html --- a/doc/en-US/Admin_Guide/html-desktop/index.html +++ b/doc/en-US/Admin_Guide/html-desktop/index.html @@ -1793,7 +1793,9 @@