| [ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <?php 2 /**************************************************************************\ 3 * eGroupWare * 4 * http://www.egroupware.org * 5 * Written by Miles Lott <milos@groupwhere.org> * 6 * -------------------------------------------- * 7 * This program is free software; you can redistribute it and/or modify it * 8 * under the terms of the GNU General Public License as published by the * 9 * Free Software Foundation; either version 2 of the License, or (at your * 10 * option) any later version. * 11 \**************************************************************************/ 12 13 /* $Id: hook_config_validate.inc.php 20295 2006-02-15 12:31:25Z $ */ 14 15 /* 16 Set a global flag to indicate this file was found by admin/config.php. 17 config.php will unset it after parsing the form values. 18 */ 19 $GLOBALS['egw_info']['server']['found_validation_hook'] = True; 20 21 /* Check a specific setting. Name must match the setting. */ 22 function ldap_contact_context($value='') 23 { 24 if($value == $GLOBALS['egw_info']['server']['ldap_context']) 25 { 26 $GLOBALS['config_error'] = 'Contact context for ldap must be different from the context used for accounts'; 27 } 28 elseif($value == $GLOBALS['egw_info']['server']['ldap_group_context']) 29 { 30 $GLOBALS['config_error'] = 'Contact context for ldap must be different from the context used for groups'; 31 } 32 else 33 { 34 $GLOBALS['config_error'] = ''; 35 } 36 } 37 38 /* Check all settings to validate input. Name must be 'final_validation' */ 39 function final_validation($value='') 40 { 41 if($value['contact_repository'] == 'ldap' && !$value['ldap_contact_dn']) 42 { 43 $GLOBALS['config_error'] = 'Contact dn must be set'; 44 } 45 elseif($value['contact_repository'] == 'ldap' && !$value['ldap_contact_context']) 46 { 47 $GLOBALS['config_error'] = 'Contact context must be set'; 48 } 49 else 50 { 51 $GLOBALS['config_error'] = ''; 52 } 53 } 54 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |