From a5bd01f621b28f8b372dd6657baf3110ce2c13b9 Mon Sep 17 00:00:00 2001 From: james Date: Wed, 26 Jan 2011 23:15:58 +0000 Subject: [PATCH] Bunch of fixes --- admin/award_awards.php | 1 + admin/registration_list.php | 8 ++++---- common.inc.bootstrap.php | 2 +- user.inc.php | 7 ++++++- version.txt | 2 +- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/admin/award_awards.php b/admin/award_awards.php index 214ea82e..bbd7ee6e 100644 --- a/admin/award_awards.php +++ b/admin/award_awards.php @@ -1047,6 +1047,7 @@ send_footer(); function draw_awards_table(){ global $config; + global $conference; $award_types_id=$_SESSION['award_types_id']; $sponsors_id=$_SESSION['sponsors_id']; diff --git a/admin/registration_list.php b/admin/registration_list.php index 33b1ef50..b903db06 100644 --- a/admin/registration_list.php +++ b/admin/registration_list.php @@ -29,14 +29,14 @@ $auth_type = user_auth_required(array(), array('fair', 'admin')); //require_once('../register_participants.inc.php'); - if($_GET['conference_id']) $conference_id=$_GET['conference_id']; - else $conference_id=$conference['id'] + if($_GET['conference_id']) $conference_id=intval($_GET['conference_id']); + else $conference_id=$conference['id']; -$q=mysql_query("SELECT * FROM projectcategories WHERE conferences_id='{$conference['id']} ORDER BY id"); +$q=mysql_query("SELECT * FROM projectcategories WHERE conferences_id='{$conference['id']}' ORDER BY id"); while($r=mysql_fetch_object($q)) $cats[$r->id]=$r->category; -$q=mysql_query("SELECT * FROM projectdivisions WHERE conferences_id='{$conference['id']} ORDER BY id"); +$q=mysql_query("SELECT * FROM projectdivisions WHERE conferences_id='{$conference['id']}' ORDER BY id"); while($r=mysql_fetch_object($q)) $divs[$r->id]=$r->division; diff --git a/common.inc.bootstrap.php b/common.inc.bootstrap.php index 5a9cf137..5c034dae 100644 --- a/common.inc.bootstrap.php +++ b/common.inc.bootstrap.php @@ -29,7 +29,7 @@ header("Content-Type: text/html; charset=UTF-8"); //set error reporting to not show notices, for some reason some people's installation dont set this by default //so we will set it in the code instead just to make sure -error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE); +//error_reporting(E_ALL & ~E_DEPRECATED ); define('REQUIREDFIELD','*'); diff --git a/user.inc.php b/user.inc.php index d4e3433c..c48f8632 100644 --- a/user.inc.php +++ b/user.inc.php @@ -44,7 +44,12 @@ function user_load($users_id, $accounts_id = false) if($accounts_id != false) { $accounts_id = intval($accounts_id); //get the user record for the current conference, if they have one - $users_id = mysql_result(mysql_query("SELECT users.id FROM users WHERE accounts_id = $accounts_id AND conferences_id='{$conference['id']}' LIMIT 1"), 0); + + //hmm this should be conference specific, but what if we cant find them? + //$q = mysql_query("SELECT users.id FROM users WHERE accounts_id = $accounts_id AND conferences_id='{$conference['id']}' LIMIT 1"); + $q = mysql_query("SELECT users.id FROM users WHERE accounts_id = $accounts_id ORDER BY conferences_id DESC LIMIT 1"); + $r=mysql_fetch_object($q); + $users_id=$r->id; //if we don't find a users id, then return false, means they dont have a record for this conference yet if(!$users_id) return false; diff --git a/version.txt b/version.txt index a6333e40..4ee4a30b 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -2.2.9 +2.9.9