| [ Index ] |
PHP Cross Reference of MantisBT |
[Summary view] [Print] [Text view]
1 <?php 2 # MantisBT - A PHP based bugtracking system 3 4 # MantisBT is free software: you can redistribute it and/or modify 5 # it under the terms of the GNU General Public License as published by 6 # the Free Software Foundation, either version 2 of the License, or 7 # (at your option) any later version. 8 # 9 # MantisBT is distributed in the hope that it will be useful, 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 # GNU General Public License for more details. 13 # 14 # You should have received a copy of the GNU General Public License 15 # along with MantisBT. If not, see <http://www.gnu.org/licenses/>. 16 17 /** 18 * Wiki API 19 * 20 * @package CoreAPI 21 * @subpackage WikiAPI 22 * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org 23 * @copyright Copyright (C) 2002 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net 24 * @link http://www.mantisbt.org 25 * 26 * @uses config_api.php 27 * @uses constant_inc.php 28 * @uses event_api.php 29 * @uses plugin_api.php 30 */ 31 32 require_api( 'config_api.php' ); 33 require_api( 'constant_inc.php' ); 34 require_api( 'event_api.php' ); 35 require_api( 'plugin_api.php' ); 36 37 /** 38 * Returns whether wiki functionality is enabled 39 * @return bool indicating whether wiki is enabled 40 * @access public 41 */ 42 function wiki_enabled() { 43 return( config_get_global( 'wiki_enable' ) == ON ); 44 } 45 46 /** 47 * 48 * @return null 49 * @access public 50 */ 51 function wiki_init() { 52 if( wiki_enabled() ) { 53 54 # handle legacy style wiki integration 55 require_once( config_get_global( 'class_path' ) . 'MantisCoreWikiPlugin.class.php' ); 56 switch( config_get_global( 'wiki_engine' ) ) { 57 case 'dokuwiki': 58 plugin_child( 'MantisCoreDokuwiki' ); 59 break; 60 case 'mediawiki': 61 plugin_child( 'MantisCoreMediaWiki' ); 62 break; 63 case 'twiki': 64 plugin_child( 'MantisCoreTwiki' ); 65 break; 66 case 'WikkaWiki': 67 plugin_child( 'MantisCoreWikkaWiki' ); 68 break; 69 case 'xwiki': 70 plugin_child( 'MantisCoreXwiki' ); 71 break; 72 } 73 74 if( is_null( event_signal( 'EVENT_WIKI_INIT' ) ) ) { 75 config_set_global( 'wiki_enable', OFF ); 76 } 77 } 78 } 79 80 /** 81 * 82 * @param int $p_bug_id Bug ID 83 * @return string url 84 * @access public 85 */ 86 function wiki_link_bug( $p_bug_id ) { 87 return event_signal( 'EVENT_WIKI_LINK_BUG', $p_bug_id ); 88 } 89 90 /** 91 * 92 * @param int $p_project_id 93 * @return string url 94 * @access public 95 */ 96 function wiki_link_project( $p_project_id ) { 97 return event_signal( 'EVENT_WIKI_LINK_PROJECT', $p_project_id ); 98 } 99
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Jul 28 15:48:31 2011 | Cross-referenced by PHPXref 0.7 |