forked from science-ation/science-ation
Oops registration_id not registrations_id
Also fix the roletype error on main page
This commit is contained in:
parent
53b155215d
commit
04dcd31b6a
6
api.php
6
api.php
@ -891,14 +891,14 @@ switch($request[0]) {
|
||||
break;
|
||||
}
|
||||
|
||||
if(!$_SESSION['registrations_id']) {
|
||||
if(!$_SESSION['registration_id']) {
|
||||
$ret['status']="error";
|
||||
$ret['error']="No registration has been created or joined yet";
|
||||
break;
|
||||
}
|
||||
|
||||
// be logged in as a student in order to create a project
|
||||
$r=getRegistration($_SESSION['registrations_id']);
|
||||
$r=getRegistration($_SESSION['registration_id']);
|
||||
if($r) {
|
||||
$ret['status']="ok";
|
||||
$ret['registration']=$r;
|
||||
@ -923,7 +923,7 @@ switch($request[0]) {
|
||||
break;
|
||||
}
|
||||
|
||||
if(!$_SESSION['registrations_id']) {
|
||||
if(!$_SESSION['registration_id']) {
|
||||
$ret['status']="error";
|
||||
$ret['error']="No registration has been created or joined yet";
|
||||
break;
|
||||
|
@ -235,8 +235,7 @@ if(!is_array($_SESSION['roles'])) {
|
||||
*/
|
||||
|
||||
if(is_array($_SESSION['roles'])) {
|
||||
foreach($_SESSION['roles'] AS $roletype) {
|
||||
// Dennis 2011-02-18 get a warning Illegal offset type in next line if php.ini shows warnings
|
||||
foreach($_SESSION['roles'] AS $roletype=>$roledata) {
|
||||
$roleid=$roles[$roletype]['id'];
|
||||
$q=mysql_query("SELECT * FROM rolestasks WHERE roles_id='$roleid' AND pid=0 AND conferencetype='{$conference['type']}' ORDER BY ord,task");
|
||||
$cl="";
|
||||
|
@ -776,7 +776,7 @@ function user_save(&$u)
|
||||
$query = "INSERT INTO judges_specialaward_sel (users_id, award_awards_id) VALUES (" . $u['id'] . ", ";
|
||||
$query .= implode('), (' . $u['id'] . ', ', $u['special_awards']);
|
||||
$query .= ")";
|
||||
echo $query;
|
||||
// echo $query;
|
||||
mysql_query($query);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user