diff --git a/api.php b/api.php index 54f555d..2e21d4f 100644 --- a/api.php +++ b/api.php @@ -44,6 +44,7 @@ fwrite($fout, " --- request at " . date("Y-m-d H:i:s") . " ---\n"); fwrite($fout, "\$_GET = \n" . print_r($_GET, true) . "\n"); fwrite($fout, "\$_POST = \n" . print_r($_POST, true) . "\n"); fwrite($fout, "\$_SESSION = \n" . print_r($_SESSION, true) . "\n"); +ob_start(); switch($request[0]) { case 'config': @@ -1278,6 +1279,9 @@ switch($request[0]) { } fwrite($fout, "result = \n" . print_r($ret, true) . "\n"); +$output=ob_get_contents(); +fwrite($fout, "outputbuffer = $output\n"); fclose($fout); +ob_end_clean(); echo json_encode($ret); ?> diff --git a/db/db.code.version.txt b/db/db.code.version.txt index 7b5813c..f8c9d43 100644 --- a/db/db.code.version.txt +++ b/db/db.code.version.txt @@ -1 +1 @@ -234 +235 diff --git a/db/db.update.235.sql b/db/db.update.235.sql new file mode 100644 index 0000000..d4b3dc4 --- /dev/null +++ b/db/db.update.235.sql @@ -0,0 +1 @@ +ALTER TABLE `project_specialawards_link` CHANGE `award_awards_id` `award_awards_id` INT( 11 ) NULL DEFAULT NULL; diff --git a/projects.inc.php b/projects.inc.php index 22ac75c..c6d2b61 100644 --- a/projects.inc.php +++ b/projects.inc.php @@ -177,18 +177,18 @@ function getNominatedForNoSpecialAwardsForProject($projectid) { global $conference; $awardsq=mysql_query("SELECT - projects.id AS projects_id + projects_id FROM - project_specialawards_link, - projects + project_specialawards_link WHERE - project_specialawards_link.projects_id='$projectid' - AND projects.conferences_id='".$conference['id']."' - AND projects.id='$projectid' - AND project_specialawards_link.award_awards_id IS NULL + projects_id='$projectid' + AND conferences_id='{$conference['id']}' + AND award_awards_id=-1 "); - if(mysql_num_rows($awardsq) == 1) return true; - return false; + if(mysql_num_rows($awardsq) == 1) + return true; + else + return false; } function getProjectsNominatedForSpecialAward($award_id) @@ -320,22 +320,24 @@ function getProjectId($registrations_id){ function getAwardListing($project_id){ $returnval = array(); $eligibleAwards = getSpecialAwardsEligibleForProject($project_id); - $nominatedawards = getSpecialAwardsNominatedForProject($project_id); + $nominatedAwards = getSpecialAwardsNominatedForProject($project_id); - $eligibleawards = array_merge(array(array( 'id'=> -1, + $eligibleAwards = array_merge(array(array( 'id'=> -1, 'name' => "I do not wish to self-nominate for any special awards", 'criteria' => "Select this option if you do not wish to self-nominate you project for any special awards.