| [ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <?php 2 /**************************************************************************\ 3 * eGroupWare - configuration administration * 4 * http://www.egroupware.org * 5 * Copyright (C) 2001 Loic Dachary * 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: class.boconfig.inc.php 20295 2006-02-15 12:31:25Z $ */ 14 15 class boconfig 16 { 17 var $public_functions = array(); 18 19 var $xml_functions = array(); 20 21 var $soap_functions = array( 22 'rpc_values' => array( 23 'in' => array('struct', 'struct'), 24 'out' => array() 25 ) 26 ); 27 28 function list_methods($_type='xmlrpc') 29 { 30 /* 31 This handles introspection or discovery by the logged in client, 32 in which case the input might be an array. The server always calls 33 this function to fill the server dispatch map using a string. 34 */ 35 if (is_array($_type)) 36 { 37 $_type = $_type['type'] ? $_type['type'] : $_type[0]; 38 } 39 switch($_type) 40 { 41 case 'xmlrpc': 42 $xml_functions = array( 43 'rpc_values' => array( 44 'function' => 'rpc_values', 45 'signature' => array(array(xmlrpcStruct,xmlrpcStruct)), 46 'docstring' => lang('Set preference values.') 47 ), 48 'list_methods' => array( 49 'function' => 'list_methods', 50 'signature' => array(array(xmlrpcStruct,xmlrpcString)), 51 'docstring' => lang('Read this list of methods.') 52 ) 53 ); 54 return $xml_functions; 55 break; 56 case 'soap': 57 return $this->soap_functions; 58 break; 59 default: 60 return array(); 61 break; 62 } 63 } 64 65 // xmlrpc functions 66 67 function rpc_values($data) 68 { 69 exit; 70 71 $newsettings = $data['newsettings']; 72 if (!$data['appname']) 73 { 74 $errors[] = "Missing appname"; 75 } 76 if (!is_array($newsettings)) 77 { 78 $errors[] = "Missing newsettings or not an array"; 79 } 80 81 if (is_array($errors)) 82 { 83 return $errors; 84 } 85 86 $conf =& CreateObject('phpgwapi.config', $data['appname']); 87 88 $conf->read_repository(); 89 reset($newsettings); 90 while(list($key,$val) = each($newsettings)) 91 { 92 $conf->value($key, $val); 93 } 94 $conf->save_repository(); 95 return True; 96 } 97 } 98 ?>
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 |