[ Index ] |
|
Code source de Mantis 1.1.0rc3 |
1 <?php 2 # MantisConnect - A webservice interface to Mantis Bug Tracker 3 # Copyright (C) 2004-2007 Victor Boctor - vboctor@users.sourceforge.net 4 # This program is distributed under dual licensing. These include 5 # GPL and a commercial licenses. Victor Boctor reserves the right to 6 # change the license of future releases. 7 # See docs/ folder for more details 8 9 # -------------------------------------------------------- 10 # $Id: mc_config_api.php,v 1.1 2007-07-18 06:52:49 vboctor Exp $ 11 # -------------------------------------------------------- 12 13 # -------------------- 14 function mc_config_get_string( $p_username, $p_password, $p_config_var ) { 15 $t_user_id = mci_check_login( $p_username, $p_password ); 16 if ( $t_user_id === false ) { 17 return new soap_fault( 'Client', '', 'Access Denied' ); 18 } 19 20 if ( !mci_has_readonly_access( $t_user_id ) ) { 21 return new soap_fault( 'Client', '', 'Access Denied' ); 22 } 23 24 if ( mci_config_is_private( $p_config_var ) ) { 25 return new soap_fault( 'Client', '', "Access to '$p_config_var' is denied" ); 26 } 27 28 if ( !config_is_set( $p_config_var ) ) { 29 return new soap_fault( 'Client', '', "Config '$p_config_var' is undefined" ); 30 } 31 32 return config_get( $p_config_var ); 33 } 34 35 # -------------------- 36 function mci_config_is_private( $p_config_var ) { 37 switch( $p_config_var ) { 38 case 'hostname': 39 case 'port': 40 case 'db_username': 41 case 'db_password': 42 case 'password_confirm_hash_magic_string': 43 case 'smtp_host': 44 case 'smtp_username': 45 case 'smtp_password': 46 return true; 47 } 48 49 if ( !is_string( $p_config_var ) ) { 50 return true; 51 } 52 53 return false; 54 } 55 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 09:42:17 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |