diff --git a/checkin_notes b/checkin_notes index 5b5bb350cf..26e18128b4 100644 --- a/checkin_notes +++ b/checkin_notes @@ -11327,3 +11327,13 @@ David 18 Nov 2007 db_update.php user/ edit_forum_preferences_action.php + +David 18 Nov 2007 + - user web: fix forum banishment vote stuff + + html/ + inc/ + forum_banishment_vote.inc + user/ + forum_banishment_vote_action.php + edit_forum_preferences_form.php diff --git a/html/inc/forum_banishment_vote.inc b/html/inc/forum_banishment_vote.inc index 861103190c..7dbd3e9548 100644 --- a/html/inc/forum_banishment_vote.inc +++ b/html/inc/forum_banishment_vote.inc @@ -42,7 +42,7 @@ function start_vote($config,$logged_in_user,$user,$category,$reason) { echo "A banishment vote is already underway for this user.

"; return 0; } - $query="insert into banishment_vote (userid,modid,start_time,end_time) values (".$user->id.",".$logged_in_user->getID().",".$now.",".$fin.")"; + $query="insert into banishment_vote (userid,modid,start_time,end_time) values (".$user->id.",".$logged_in_user->id.",".$now.",".$fin.")"; $result = mysql_query($query); if (!$result) { echo "Database error attempting to insert to banishment_vote table.

"; @@ -50,7 +50,7 @@ function start_vote($config,$logged_in_user,$user,$category,$reason) { } $voteid=mysql_insert_id(); - $query="insert into banishment_votes (voteid,modid,time,yes) values (". $voteid .",". $logged_in_user->getID() .",". $now .",1)"; + $query="insert into banishment_votes (voteid,modid,time,yes) values (". $voteid .",". $logged_in_user->id .",". $now .",1)"; $result = mysql_query($query); if (!$result) { echo "Database error attempting to insert to banishment_votes table.

"; @@ -82,7 +82,7 @@ function vote_yes($config,$logged_in_user,$user) { } $voteid=$foobar->voteid; // Check whether mod has voted already. - $query="select count(id) as count from banishment_votes where voteid=".$voteid." and modid=".$logged_in_user->getID(); + $query="select count(id) as count from banishment_votes where voteid=".$voteid." and modid=".$logged_in_user->id; $result = mysql_query($query); $foobar = mysql_fetch_object($result); if (!$foobar) { @@ -95,7 +95,7 @@ function vote_yes($config,$logged_in_user,$user) { return 0; } // insert the vote - $query="insert into banishment_votes (voteid,modid,time,yes) values (" . $voteid .",". $logged_in_user->getID() .",". $now .",1)"; + $query="insert into banishment_votes (voteid,modid,time,yes) values (" . $voteid .",". $logged_in_user->id .",". $now .",1)"; $result = mysql_query($query); if (!$result) { echo "Database error attempting to insert to banishment_votes table.

"; @@ -123,7 +123,7 @@ function vote_no($config,$logged_in_user,$user) { } $voteid=$foobar->voteid; // Check whether mod has voted already. - $query="select count(id) as count from banishment_votes where voteid=".$voteid ." and modid=".$logged_in_user->getID(); + $query="select count(id) as count from banishment_votes where voteid=".$voteid ." and modid=".$logged_in_user->id; $result = mysql_query($query); $foobar = mysql_fetch_object($result); if (!$foobar) { @@ -136,7 +136,7 @@ function vote_no($config,$logged_in_user,$user) { return 0; } // insert the vote - $query="insert into banishment_votes (voteid,modid,time,yes) values (" . $voteid .",". $logged_in_user->getID() .",". $now .",0)"; + $query="insert into banishment_votes (voteid,modid,time,yes) values (" . $voteid .",". $logged_in_user->id .",". $now .",0)"; $result = mysql_query($query); if (!$result) { echo "Database error attempting to insert to banishment_votes table.

"; diff --git a/html/user/edit_forum_preferences_form.php b/html/user/edit_forum_preferences_form.php index 59477d3bde..989731e043 100644 --- a/html/user/edit_forum_preferences_form.php +++ b/html/user/edit_forum_preferences_form.php @@ -91,7 +91,7 @@ if ($user->prefs->pm_notification){ } row2("Private message email notification", " - " + " ); if ($user->prefs->hide_avatars){ diff --git a/html/user/forum_banishment_vote_action.php b/html/user/forum_banishment_vote_action.php index 933ba23d1c..ac85e0884a 100644 --- a/html/user/forum_banishment_vote_action.php +++ b/html/user/forum_banishment_vote_action.php @@ -3,6 +3,7 @@ $cvs_version_tracker[]="\$Id: forum_moderate_post_action.php 13718 2007-09-30 11 require_once("../inc/forum_db.inc"); +require_once("../inc/forum_banishment_vote.inc"); $config = get_config();