forked from science-ation/science-ation
Fix api for categories (projectcategories_load wouldnt have ever worked!)
This commit is contained in:
parent
4ddbffe4bb
commit
e590c94690
12
api.php
12
api.php
@ -58,7 +58,9 @@ switch($request[0]) {
|
||||
return(divisions array)
|
||||
*/
|
||||
case 'divisions':
|
||||
|
||||
$divs=projectdivisions_load();
|
||||
$ret['status']="ok";
|
||||
$ret['divisions']=$divs;
|
||||
break;
|
||||
|
||||
/* APIDOC: config/subdivisions
|
||||
@ -66,7 +68,9 @@ switch($request[0]) {
|
||||
return(subdivisions array)
|
||||
*/
|
||||
case 'subdivisions':
|
||||
|
||||
$subdivs=projectsubdivisions_load();
|
||||
$ret['status']="ok";
|
||||
$ret['subdivisions']=$subdivs;
|
||||
break;
|
||||
|
||||
/* APIDOC: config/categories
|
||||
@ -74,7 +78,9 @@ switch($request[0]) {
|
||||
return(categories array)
|
||||
*/
|
||||
case 'categories':
|
||||
|
||||
$cats=projectcategories_load();
|
||||
$ret['status']="ok";
|
||||
$ret['categories']=$cats;
|
||||
break;
|
||||
|
||||
}
|
||||
|
@ -773,8 +773,9 @@ function projectcategories_load($conferences_id = false) {
|
||||
global $conference;
|
||||
if($conferences_id == false) $conferences_id = $conference['id'];
|
||||
$cats = array();
|
||||
echo "conferences_id=$conferences_id";
|
||||
$q = mysql_query("SELECT * FROM projectcategories WHERE conferences_id='$conferences_id'");
|
||||
while(($c = mysql_fetch_assoc($q))) $cats[$c['id']] = $d;
|
||||
while(($c = mysql_fetch_assoc($q))) $cats[$c['id']] = $c;
|
||||
return $cats;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user