Rename $_SESSION['conferenceid'] to $_SESSION['conferences_id'] for

naming consistency.
This commit is contained in:
dave 2010-07-13 05:20:35 +00:00
parent 6e464998b5
commit 98d264ef67
3 changed files with 10 additions and 10 deletions

View File

@ -37,7 +37,7 @@
echo "<br />";
echo "<table class=\"adminconfigtable\">";
//need to know which conference we're managing for these
if(isset($_SESSION['conferenceid'])) {
if(isset($_SESSION['conferences_id'])) {
echo " <tr>";
if(committee_auth_has_access('config')) {
echo " <td><a href=\"config/index.php\">".theme_icon("configuration")."<br />".i18n("Conference Configuration")."</a></td>";

View File

@ -202,10 +202,10 @@ if($config['SFIABDIRECTORY'] == '') {
}
session_start();
if(!$_SESSION['conferenceid']) {
if(!$_SESSION['conferences_id']) {
$q=mysql_query("SELECT * FROM conferences WHERE status='running' ORDER BY name LIMIT 1");
if($r=mysql_fetch_object($q)) {
$_SESSION['conferenceid']=$r->id;
$_SESSION['conferences_id']=$r->id;
}
else {
echo "No conferences defined!";
@ -219,12 +219,12 @@ if(isset($_GET['switchconference'])) {
// echo "cid=$cid";
$q=mysql_query("SELECT * FROM conferences WHERE id='$cid' AND status='running'");
if($r=mysql_fetch_object($q)) {
$_SESSION['conferenceid']=$cid;
$_SESSION['conferences_id']=$cid;
}
}
if(intval($_SESSION['conferenceid'])>0) {
$q=mysql_query("SELECT * FROM conferences WHERE id='".$_SESSION['conferenceid']."'");
if(intval($_SESSION['conferences_id'])>0) {
$q=mysql_query("SELECT * FROM conferences WHERE id='{$_SESSION['conferences_id']}'");
$conference=mysql_fetch_assoc($q);
/*
@ -501,7 +501,7 @@ echo "</a>";
<div id="header_title">
<?
if(!$_SESSION['conferenceid']) {
if(!$_SESSION['conferences_id']) {
echo "<h1>".i18n($config['fairname'])."</h1>";
} else {
global $conference;
@ -516,7 +516,7 @@ if(!$_SESSION['conferenceid']) {
if(mysql_num_rows($q)) {
echo "<ul class=\"conferencenav\">";
while($r=mysql_fetch_object($q)) {
if($_SESSION['conferenceid']==$r->id)
if($_SESSION['conferences_id']==$r->id)
$cl="class=\"selected\"";
else
$cl="";

View File

@ -141,14 +141,14 @@ if(isset($_SESSION['accounts_id'])) {
/* Use the active conference to find the user id to load */
/* FIXME: Need to be able to handle the case where there is no
* active conference, but one step at a time */
$q = mysql_query("SELECT id FROM users WHERE accounts_id=$accounts_id AND conferences_id={$_SESSION['conferenceid']}");
$q = mysql_query("SELECT id FROM users WHERE accounts_id=$accounts_id AND conferences_id={$_SESSION['conferences_id']}");
if(mysql_num_rows($q) == 0) {
/* FIXME: this should probably just return false, but for now, see if there's an error */
echo "No user for that conference";
exit;
}
if(mysql_num_rows($q) > 1) {
echo "DATABASE ERROR: More than one user for account $accounts_id conference {$_SESSION['conferenceid']}";
echo "DATABASE ERROR: More than one user for account $accounts_id conference {$_SESSION['conferences_id']}";
exit;
}
$uid = mysql_fetch_assoc($q);