forked from science-ation/science-ation
Add /api/config
This commit is contained in:
parent
88055eb6a6
commit
e0eef7effa
14
api.php
14
api.php
@ -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':
|
||||||
|
Loading…
Reference in New Issue
Block a user