mantisbt:issue:7075:integration_with_dokuwiki
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
mantisbt:issue:7075:integration_with_dokuwiki [2012/04/28 18:38] – added getUserData(); needed for dokuwikis e-mail subscription mrends | mantisbt:issue:7075:integration_with_dokuwiki [2015/02/13 18:11] (current) – Use InterWiki syntax for MantisBT bug links dregad | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Integrating DokuWiki with Mantis ====== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Disclaimer ===== | ||
+ | |||
+ | This document describes the steps needed to integrate DokuWiki with Mantis. | ||
+ | The method described here was originally tested with mantis version 1.1.0rc2 and dokuwiki rc2009-12-02, | ||
+ | and should work with subsequent versions (modulo bugs). | ||
+ | It may work with older versions of mantis provided you make the File Changes described below. | ||
+ | ---- | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Integration Functionality ===== | ||
+ | |||
+ | The integration between Mantis and DokuWiki so far achieves the following: | ||
+ | |||
+ | * Customises DokuWiki to honour Mantis authentication (i.e. single sign-on). | ||
+ | * Customises DokuWiki authorisation based on Mantis access levels (i.e. groups). | ||
+ | * Adds a Wiki link on the issue view simple/ | ||
+ | * Adds a Wiki menu option which maps to the corresponding project Wiki page, or general page in case of "All Projects" | ||
+ | * Provides a way for Wiki pages to link to Mantis issues, e.g. [[Mantis> | ||
+ | * Correctly manages HTTP Authentication. See ([[mantis> | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Tips ===== | ||
+ | |||
+ | Following are some tips that are of interest to Mantis / DokuWiki integration: | ||
+ | |||
+ | * To define a template for all Wiki pages within a namespace, create '' | ||
+ | |||
+ | * The Wiki menu links in Mantis are equivalent to internal links for '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | * The View Issue Details Wiki links in Mantis are equivalent to internal links for '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | * How Wiki access levels are determined: The Mantis auth backend included below takes the namespace containing the object being accessed, extracts the 2nd component, and looks it up in a flat list of Mantis projects. If there is a match, that project' | ||
+ | |||
+ | * Another consequence of the simplistic code here is that it fails to adjust when '' | ||
+ | |||
+ | * Rename (if necessary) your projects and subprojects so that all their names are legal [[doku> | ||
+ | |||
+ | * DokuWiki will see groups for each combination of Mantis project and access level that exist for the current user. For example: | ||
+ | |||
+ | < | ||
+ | my_namespace: | ||
+ | my_namespace: | ||
+ | my_namespace: | ||
+ | </ | ||
+ | |||
+ | ===== Mantis Configuration ===== | ||
+ | |||
+ | Add the following configuration items to '' | ||
+ | Copy the corresponding block from '' | ||
+ | Note however that the list of valid wiki engines may be out of date; as of 1.2.6 the correct list is in the switch statement in '' | ||
+ | |||
+ | <code php> | ||
+ | ##################### | ||
+ | # Wiki Integration | ||
+ | ##################### | ||
+ | |||
+ | # Wiki Integration Enabled? | ||
+ | $g_wiki_enable = OFF; | ||
+ | |||
+ | # Wiki Engine | ||
+ | $g_wiki_engine = ' | ||
+ | |||
+ | # Wiki namespace to be used as root for all pages relating to this mantis installation. | ||
+ | $g_wiki_root_namespace = ' | ||
+ | |||
+ | # URL under which the wiki engine is hosted. | ||
+ | $g_wiki_engine_url = $t_protocol . '://' | ||
+ | </ | ||
+ | |||
+ | Tip: If you are using different subdomains (eg. mantis lives at: bugs.example.com and doku lives at wiki.example.com) | ||
+ | then you need to make the cookies accessible to both subdomains. | ||
+ | In your mantis '' | ||
+ | <code php> | ||
+ | $g_cookie_domain = ' | ||
+ | </ | ||
+ | |||
+ | Don't forget to change g_wiki_enable to ON later once you are done setting up DokuWiki. | ||
+ | |||
+ | ===== DokuWiki Steps ===== | ||
+ | |||
+ | ==== Installation ==== | ||
+ | |||
+ | Install [[http:// | ||
+ | |||
+ | ==== Core Configuration ==== | ||
+ | |||
+ | Add/modify the configuration values show below in your DokuWiki installation. | ||
+ | Recent versions (eg. 2011-05-25a " | ||
+ | Use '' | ||
+ | Otherwise use '' | ||
+ | |||
+ | In fact a fix is needed to implement the two settings to the config page. (fix in form of plugin is already done here http:// | ||
+ | |||
+ | <code php> | ||
+ | # | ||
+ | # Add the following lines: | ||
+ | # | ||
+ | |||
+ | define( ' | ||
+ | define( ' | ||
+ | |||
+ | # | ||
+ | # Once you have inc\auth\mantis.class.php created, modify the following configuration options to match the values below. | ||
+ | # With modern versions of dokuwiki, the bundled config plugin can set these values, otherwise uncomment them here. | ||
+ | # | ||
+ | |||
+ | # $conf[' | ||
+ | # $conf[' | ||
+ | # $conf[' | ||
+ | # $conf[' | ||
+ | |||
+ | # | ||
+ | # If selecting the mantis auth backend results in fatal errors from redeclaration of utf8 functions, uncomment this: | ||
+ | # | ||
+ | # require_once( MANTIS_ROOT . ' | ||
+ | </ | ||
+ | |||
+ | (utf8 redeclaration error reference: http:// | ||
+ | |||
+ | |||
+ | ==== Authorisation Configuration ==== | ||
+ | |||
+ | Add the following to the end of '' | ||
+ | |||
+ | < | ||
+ | * @VIEWER 1 | ||
+ | * @REPORTER 2 | ||
+ | * @UPDATER 4 | ||
+ | * @DEVELOPER 8 | ||
+ | * @MANAGER 16 | ||
+ | * @ADMINISTRATOR 16 | ||
+ | </ | ||
+ | |||
+ | This will get you started. See the Tips section above for information about per-project group mappings. | ||
+ | |||
+ | |||
+ | ==== Mantis Authentication Backend (Single Sign-On) ==== | ||
+ | |||
+ | Create '' | ||
+ | |||
+ | <code php dokuwiki\inc\auth\mantis.class.php> | ||
+ | <?php | ||
+ | /** | ||
+ | * Mantis auth backend | ||
+ | * | ||
+ | * Uses external Trust mechanism to check against Mantis' | ||
+ | * user cookie. | ||
+ | * 13/12/2009 ~ @Tiago Gomes: | ||
+ | * added modifications to make possible to set project related user rights.(http:// | ||
+ | * added modifications so that mantis support logging in/out from DokuWiki’s login page (http:// | ||
+ | | ||
+ | * | ||
+ | * @author | ||
+ | | ||
+ | */ | ||
+ | require_once( MANTIS_ROOT . ' | ||
+ | |||
+ | # | ||
+ | |||
+ | class auth_mantis extends auth_basic { | ||
+ | /** | ||
+ | * Constructor. | ||
+ | * | ||
+ | * Sets additional capabilities and config strings | ||
+ | */ | ||
+ | function auth_mantis(){ | ||
+ | $this-> | ||
+ | |||
+ | $this-> | ||
+ | } | ||
+ | | ||
+ | /** | ||
+ | * Authenticates the user using Mantis APIs. | ||
+ | */ | ||
+ | function trustExternal($user, | ||
+ | global $USERINFO; | ||
+ | global $conf; | ||
+ | |||
+ | $ValidUser = false; | ||
+ | |||
+ | // Manage HTTP authentication with Negotiate protocol enabled | ||
+ | $user = auth_prepare_username($user); | ||
+ | $pass = auth_prepare_password($pass); | ||
+ | // This is necessary in all cases where Authorization HTTP header is always set | ||
+ | if(auth_is_user_authenticated()) | ||
+ | { | ||
+ | $user=''; | ||
+ | } | ||
+ | |||
+ | // Has a user name been provided? | ||
+ | if ( !empty ( $user ) ) | ||
+ | { | ||
+ | // User name provided, so login via form in progress... | ||
+ | // Are the specified user name and password valid? | ||
+ | if ( auth_attempt_login ( $user, $pass, $sticky ) ) | ||
+ | { | ||
+ | // Credential accepted... | ||
+ | $_SERVER[' | ||
+ | $ValidUser = true; // Report success. | ||
+ | } | ||
+ | else | ||
+ | { | ||
+ | // Invalid credentials | ||
+ | if ( !$silent ) | ||
+ | { | ||
+ | msg ( $lang [ ' | ||
+ | } | ||
+ | | ||
+ | $ValidUser = false; | ||
+ | } | ||
+ | } | ||
+ | else | ||
+ | { | ||
+ | // No user name provided. | ||
+ | // Is a user already logged in? | ||
+ | if ( auth_is_user_authenticated ( ) ) | ||
+ | { | ||
+ | // Yes, a user is logged in, so set the globals... | ||
+ | // is it a media display or a page? | ||
+ | if (isset($_REQUEST[' | ||
+ | //media | ||
+ | $t_project_name = explode( ':', | ||
+ | } else { | ||
+ | // normal page | ||
+ | $t_project_name = explode( ':', | ||
+ | } | ||
+ | $t_project_id = project_get_id_by_name( $t_project_name[1] ); | ||
+ | $t_access_level = access_get_project_level( $t_project_id ); | ||
+ | $t_access_level_string = strtoupper( MantisEnum:: | ||
+ | // $t_access_level_string = strtoupper( get_enum_to_string( config_get( ' | ||
+ | $t_access_level_string_ex = strtoupper( $t_project_name[1] ) . ' | ||
+ | |||
+ | $USERINFO[' | ||
+ | $USERINFO[ ' | ||
+ | $USERINFO[ ' | ||
+ | $USERINFO[ ' | ||
+ | | ||
+ | $_SERVER[ ' | ||
+ | $_SESSION[ $conf[ ' | ||
+ | $_SESSION[ $conf[ ' | ||
+ | | ||
+ | $ValidUser = true; | ||
+ | } | ||
+ | else | ||
+ | { | ||
+ | $ValidUser = false; | ||
+ | } | ||
+ | } | ||
+ | | ||
+ | // Is there a valid user login? | ||
+ | if ( true != $ValidUser ) | ||
+ | { | ||
+ | // No, so make sure any existing authentication is revoked. | ||
+ | auth_logoff ( ); | ||
+ | } | ||
+ | | ||
+ | return $ValidUser; | ||
+ | } | ||
+ | /** | ||
+ | * Logout from Mantis | ||
+ | */ | ||
+ | function logOff(){ | ||
+ | auth_logout(); | ||
+ | } | ||
+ | |||
+ | /** | ||
+ | * Get user data | ||
+ | * (needed for e-mail subscriptions) | ||
+ | * | ||
+ | * @author Martin Arends http:// | ||
+ | */ | ||
+ | function getUserData($user) | ||
+ | { | ||
+ | $data = array(); | ||
+ | | ||
+ | $t_user_id = user_get_id_by_name( $user ); | ||
+ | |||
+ | if (isset($_REQUEST[' | ||
+ | //media | ||
+ | $t_project_name = explode( ':', | ||
+ | } else { | ||
+ | // normal page | ||
+ | $t_project_name = explode( ':', | ||
+ | } | ||
+ | |||
+ | $t_project_id | ||
+ | $t_access_level = access_get_project_level( $t_project_id, | ||
+ | $t_access_level_string | ||
+ | $t_access_level_string_ex = strtoupper( $t_project_name[1] ) . ' | ||
+ | | ||
+ | $data[' | ||
+ | $data[' | ||
+ | $data[' | ||
+ | return $data; | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | This codes already contains the following mods: | ||
+ | * [[http:// | ||
+ | * Support logging in/out from DokuWiki' | ||
+ | If you want the original code, you can see the wiki history | ||
+ | |||
+ | ==== Mantis Syntax Plug-in ==== | ||
+ | |||
+ | This plugin is to be placed in '' | ||
+ | Create the '' | ||
+ | |||
+ | <code php dokuwiki\lib\plugins\mantis\syntax.php> | ||
+ | <?php | ||
+ | /** | ||
+ | * Mantis Plugin: Hyperlinks references to Mantis Issues | ||
+ | | ||
+ | * @license | ||
+ | * @author | ||
+ | */ | ||
+ | |||
+ | |||
+ | if(!defined(' | ||
+ | if(!defined(' | ||
+ | require_once(DOKU_PLUGIN.' | ||
+ | |||
+ | /** | ||
+ | * A plug-in that hyper links references to Mantis issues. | ||
+ | * to Mantis issues should use the following format: ~~Mantis: | ||
+ | * | ||
+ | * All DokuWiki plugins to extend the parser/ | ||
+ | * need to inherit from this class | ||
+ | */ | ||
+ | class syntax_plugin_mantis extends DokuWiki_Syntax_Plugin { | ||
+ | |||
+ | /** | ||
+ | * return some info | ||
+ | */ | ||
+ | function getInfo(){ | ||
+ | return array( | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ); | ||
+ | } | ||
+ | |||
+ | /** | ||
+ | * What kind of syntax are we? | ||
+ | */ | ||
+ | function getType(){ | ||
+ | return ' | ||
+ | } | ||
+ | |||
+ | /** | ||
+ | * What about paragraphs? | ||
+ | */ | ||
+ | function getPType(){ | ||
+ | return ' | ||
+ | } | ||
+ | |||
+ | /** | ||
+ | * Where to sort in? | ||
+ | | ||
+ | function getSort(){ | ||
+ | return 156; | ||
+ | } | ||
+ | |||
+ | |||
+ | /** | ||
+ | * Connect pattern to lexer | ||
+ | */ | ||
+ | function connectTo($mode) { | ||
+ | $this-> | ||
+ | } | ||
+ | |||
+ | |||
+ | /** | ||
+ | * Handle the match | ||
+ | */ | ||
+ | function handle($match, | ||
+ | $match = substr( $match, 9, -2 ); // strip " | ||
+ | return array( strtolower( $match ) ); | ||
+ | } | ||
+ | |||
+ | /** | ||
+ | * Create output | ||
+ | */ | ||
+ | function render($format, | ||
+ | if ( $format == ' | ||
+ | $renderer-> | ||
+ | return true; | ||
+ | } | ||
+ | return false; | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ===== Mantis File Changes for versions before 1.1.0rc2 ===== | ||
+ | |||
+ | If you use mantis 1.1.0rc2 (or later), the following steps are already done and you just need to set | ||
+ | < | ||
+ | in your '' | ||
+ | |||
+ | If you use a mantis version which is older than 1.1.0rc2 please check if any of the changes below still need to be done. | ||
+ | |||
+ | ==== wiki_api.php ==== | ||
+ | |||
+ | Create '' | ||
+ | |||
+ | <code php mantis/ | ||
+ | <?php | ||
+ | # Mantis - a php based bugtracking system | ||
+ | # Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org | ||
+ | # Copyright (C) 2002 - 2006 Mantis Team - mantisbt-dev@lists.sourceforge.net | ||
+ | # This program is distributed under the terms and conditions of the GPL | ||
+ | # See the README and LICENSE files for details | ||
+ | |||
+ | # -------------------------------------------------------- | ||
+ | # $Id: $ | ||
+ | # -------------------------------------------------------- | ||
+ | |||
+ | require_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . ' | ||
+ | require_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . ' | ||
+ | require_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . ' | ||
+ | require_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . ' | ||
+ | require_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . ' | ||
+ | require_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . ' | ||
+ | require_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . ' | ||
+ | require_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . ' | ||
+ | |||
+ | # ---------------------- | ||
+ | # Calls a function with the specified name (not including prefix) and given the array | ||
+ | # of parameters supplied. | ||
+ | function wiki_call( $p_function, | ||
+ | $t_function = ' | ||
+ | return call_user_func_array( $t_function, | ||
+ | } | ||
+ | |||
+ | # ---------------------- | ||
+ | # Checks if the Wiki feature is enabled or not. | ||
+ | function wiki_is_enabled() { | ||
+ | return config_get( ' | ||
+ | } | ||
+ | |||
+ | # ---------------------- | ||
+ | # Ensures that the wiki feature is enabled. | ||
+ | function wiki_ensure_enabled() { | ||
+ | if ( !wiki_is_enabled() ) { | ||
+ | access_denied(); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | # ---------------------- | ||
+ | # Gets the wiki URL for the issue with the specified id. | ||
+ | function wiki_get_url_for_issue( $p_issue_id ) { | ||
+ | return wiki_call( ' | ||
+ | } | ||
+ | |||
+ | # ---------------------- | ||
+ | # Gets the wiki URL for the project with the specified id. The project id can be ALL_PROJECTS. | ||
+ | function wiki_get_url_for_project( $p_project_id ) { | ||
+ | return wiki_call( ' | ||
+ | } | ||
+ | ?> | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ==== wiki_dokuwiki_api.php ==== | ||
+ | |||
+ | Create '' | ||
+ | |||
+ | <code php mantis/ | ||
+ | <?php | ||
+ | # Mantis - a php based bugtracking system | ||
+ | # Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org | ||
+ | # Copyright (C) 2002 - 2006 Mantis Team - mantisbt-dev@lists.sourceforge.net | ||
+ | # This program is distributed under the terms and conditions of the GPL | ||
+ | # See the README and LICENSE files for details | ||
+ | |||
+ | # -------------------------------------------------------- | ||
+ | # $Id: $ | ||
+ | # -------------------------------------------------------- | ||
+ | |||
+ | # ---------------------- | ||
+ | # Gets the URL for the page with the specified page id. This function is used | ||
+ | # internally by this API. | ||
+ | function wiki_dokuwiki_get_url_for_page_id( $p_page_id ) { | ||
+ | $t_root_url = config_get_global( ' | ||
+ | |||
+ | $t_root_namespace = config_get( ' | ||
+ | |||
+ | if ( is_blank( $t_root_namespace ) ) { | ||
+ | $t_page_id = $p_page_id; | ||
+ | } else { | ||
+ | $t_page_id = $t_root_namespace . ':' | ||
+ | } | ||
+ | |||
+ | return $t_root_url . ' | ||
+ | } | ||
+ | |||
+ | # ---------------------- | ||
+ | # Gets the page id for the specified issue. | ||
+ | # to a URL using wiki_dokuwiki_get_url_for_page_id(). | ||
+ | function wiki_dokuwiki_get_page_id_for_issue( $p_issue_id ) { | ||
+ | $c_issue_id = db_prepare_int( $p_issue_id ); | ||
+ | |||
+ | $t_project_id = bug_get_field( $p_issue_id, | ||
+ | $t_project_name = project_get_name( $t_project_id ); | ||
+ | |||
+ | # create a namespace for the project to contain all project documentation. | ||
+ | # create within it a namespace for issues. | ||
+ | # file to act as the template for issues belonging to this project. | ||
+ | return $t_project_name . ': | ||
+ | |||
+ | # when using a different language you also could use the translation of ' | ||
+ | # but when working in a multilingual environment this will lead to different namespaces for each language | ||
+ | # (which may be intentional or not). Maybe one should make it configurable one day | ||
+ | |||
+ | # return $t_project_name . ':' | ||
+ | |||
+ | } | ||
+ | |||
+ | # ---------------------- | ||
+ | # Gets the page url for the specified issue id. | ||
+ | function wiki_dokuwiki_get_url_for_issue( $p_issue_id ) { | ||
+ | return wiki_dokuwiki_get_url_for_page_id( wiki_dokuwiki_get_page_id_for_issue( $p_issue_id ) ); | ||
+ | } | ||
+ | |||
+ | # ---------------------- | ||
+ | # Gets the page id for the specified project. | ||
+ | # The page id can then be converted to URL using wiki_dokuwiki_get_url_for_page_id(). | ||
+ | function wiki_dokuwiki_get_page_id_for_project( $p_project_id ) { | ||
+ | $t_home = ' | ||
+ | if ( $p_project_id == ALL_PROJECTS ) { | ||
+ | return $t_home; | ||
+ | } else { | ||
+ | $t_project_name = project_get_name( $p_project_id ); | ||
+ | return $t_project_name . ':' | ||
+ | } | ||
+ | } | ||
+ | |||
+ | # ---------------------- | ||
+ | # Get URL for the specified project id. The project is can be ALL_PROJECTS. | ||
+ | function wiki_dokuwiki_get_url_for_project( $p_project_id ) { | ||
+ | return wiki_dokuwiki_get_url_for_page_id( wiki_dokuwiki_get_page_id_for_project( $p_project_id ) ); | ||
+ | } | ||
+ | ?> | ||
+ | </ | ||
+ | |||
+ | ==== html_api.php ==== | ||
+ | |||
+ | Add the following with the rest of the includes: | ||
+ | <code php> | ||
+ | require_once( $t_core_dir . ' | ||
+ | </ | ||
+ | |||
+ | In the '' | ||
+ | |||
+ | <code php> | ||
+ | # Project Wiki | ||
+ | if ( wiki_is_enabled() ) { | ||
+ | $t_current_project = helper_get_current_project(); | ||
+ | $t_menu_options[] = '<a href=" | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Add the following function: | ||
+ | <code php> | ||
+ | # -------------------- | ||
+ | # Print a button to create a wiki page | ||
+ | function html_button_wiki( $p_bug_id ) { | ||
+ | if ( ON == config_get( ' | ||
+ | if ( access_has_bug_level( config_get( ' | ||
+ | html_button( ' | ||
+ | lang_get_defaulted( ' | ||
+ | array( ' | ||
+ | ' | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Update '' | ||
+ | |||
+ | <code php> | ||
+ | # -------------------- | ||
+ | # Print an html button inside a form | ||
+ | function html_button ( $p_action, $p_button_text, | ||
+ | $p_action = urlencode( $p_action ); | ||
+ | $p_button_text = string_attribute( $p_button_text ); | ||
+ | if ( null === $p_fields ) { | ||
+ | $p_fields = array(); | ||
+ | } | ||
+ | |||
+ | if ( strtolower( $p_method ) == ' | ||
+ | $t_method = ' | ||
+ | } else { | ||
+ | $t_method = ' | ||
+ | } | ||
+ | |||
+ | PRINT "< | ||
+ | |||
+ | foreach ( $p_fields as $key => $val ) { | ||
+ | $key = string_attribute( $key ); | ||
+ | $val = string_attribute( $val ); | ||
+ | |||
+ | PRINT " | ||
+ | } | ||
+ | |||
+ | PRINT " | ||
+ | PRINT "</ | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ==== lang/ | ||
+ | |||
+ | Add the following at the end of the file but before the PHP end block (?>): | ||
+ | <code php> | ||
+ | # wiki related strings | ||
+ | $s_wiki = ' | ||
+ | </ | ||
+ | |||
+ | ==== wiki.php ==== | ||
+ | |||
+ | Create wiki.php file in Mantis root folder: | ||
+ | |||
+ | <code php wiki.php> | ||
+ | <?php | ||
+ | require_once( ' | ||
+ | |||
+ | $t_core_path = config_get( ' | ||
+ | |||
+ | require_once( $t_core_path . ' | ||
+ | |||
+ | $f_id = gpc_get_int( ' | ||
+ | $f_type = gpc_get_string( ' | ||
+ | |||
+ | if ( $f_type == ' | ||
+ | project_ensure_exists( $f_id ); | ||
+ | $t_url = wiki_get_url_for_project( $f_id ); | ||
+ | } else { | ||
+ | bug_ensure_exists( $f_id ); | ||
+ | $t_url = wiki_get_url_for_issue( $f_id ); | ||
+ | } | ||
+ | |||
+ | print_header_redirect( $t_url ); | ||
+ | ?> | ||
+ | </ | ||
+ | |||
+ | ==== bug_view_*_page.php ==== | ||
+ | |||
+ | Add the following code before the <td> tag that comes before the "< | ||
+ | |||
+ | <code php> | ||
+ | <span class=" | ||
+ | <?php print_bracket_link( ' | ||
+ | </ | ||
+ | </ |
mantisbt/issue/7075/integration_with_dokuwiki.txt · Last modified: 2015/02/13 18:11 by dregad