[ Index ]
 

Code source de Mantis 1.1.0rc3

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/core/ -> wiki_api.php (source)

   1  <?php
   2  # Mantis - a php based bugtracking system
   3  
   4  # Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
   5  # Copyright (C) 2002 - 2007  Mantis Team   - mantisbt-dev@lists.sourceforge.net
   6  
   7  # Mantis is free software: you can redistribute it and/or modify
   8  # it under the terms of the GNU General Public License as published by
   9  # the Free Software Foundation, either version 2 of the License, or
  10  # (at your option) any later version.
  11  #
  12  # Mantis is distributed in the hope that it will be useful,
  13  # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15  # GNU General Public License for more details.
  16  #
  17  # You should have received a copy of the GNU General Public License
  18  # along with Mantis.  If not, see <http://www.gnu.org/licenses/>.
  19   
  20      # --------------------------------------------------------
  21      # $Id: wiki_api.php,v 1.1.2.1 2007-10-13 22:35:48 giallu Exp $
  22      # --------------------------------------------------------
  23   
  24      require_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'helper_api.php' );
  25      require_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'utility_api.php' );
  26      require_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'database_api.php' );
  27      require_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'authentication_api.php' );
  28      require_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'gpc_api.php' );
  29      require_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'access_api.php' );
  30      require_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'project_api.php' );
  31      require_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'wiki_' . config_get( 'wiki_engine' ) . '_api.php' );
  32  
  33      # ----------------------
  34      # Calls a function with the specified name (not including prefix) and given the array
  35      # of parameters supplied.  An example prefix is "wiki_dokuwiki_".
  36  	function wiki_call( $p_function, $p_args_array ) {
  37          $t_function = 'wiki_' . config_get_global( 'wiki_engine' ) . '_' . $p_function;
  38          return call_user_func_array( $t_function, $p_args_array );
  39      }
  40  
  41      # ----------------------
  42      # Checks if the Wiki feature is enabled or not.
  43  	function wiki_is_enabled() {
  44          return config_get( 'wiki_enable' ) == ON;
  45      }
  46   
  47       # ----------------------
  48      # Ensures that the wiki feature is enabled.
  49  	function wiki_ensure_enabled() {
  50          if ( !wiki_is_enabled() ) {
  51              access_denied();
  52          }
  53      }
  54   
  55      # ----------------------
  56      # Gets the wiki URL for the issue with the specified id.
  57  	function wiki_get_url_for_issue( $p_issue_id ) {
  58          return wiki_call( 'get_url_for_issue', array( $p_issue_id ) );
  59      }
  60   
  61      # ----------------------
  62      # Gets the wiki URL for the project with the specified id.  The project id can be ALL_PROJECTS.
  63  	function wiki_get_url_for_project( $p_project_id ) {
  64          return wiki_call( 'get_url_for_project', array( $p_project_id ) );
  65      }
  66   
  67      # ----------------------
  68      /*
  69      function wiki_string_display_links( $p_string ) {
  70          if ( !wiki_is_enabled() ) {
  71              return $p_string;
  72          }
  73   
  74          return wiki_call( 'string_display_links', array( $p_string ) );
  75      }
  76      */
  77  ?>


Généré le : Thu Nov 29 09:42:17 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics