Add /api/config

This commit is contained in:
james 2010-10-01 17:13:48 +00:00
parent 88055eb6a6
commit e0eef7effa

14
api.php
View File

@ -37,6 +37,20 @@ $request=explode("/",$_GET['request']);
$ret=array(); $ret=array();
switch($request[0]) { switch($request[0]) {
/* APIDOC: config
description(retreives the entire configuration variables, minus ones that cant be included (like passwords)
return(config array)
*/
case 'config':
$exclude=array("judge_registration_singlepassword","volunteer_registration_singlepassword","participant_registration_singlepassword","fairmanageremail");
$configapi=$config;
foreach($exclude AS $e) {
unset($configapi[$e]);
}
$ret['status']="ok";
$ret['config']=$configapi;
break;
case 'locations': case 'locations':
switch($request[1]){ switch($request[1]){
case 'list': case 'list':