From fea46745240b7a6571b60b1435372b5b259787c2 Mon Sep 17 00:00:00 2001 From: "Eric J. Korpela" Date: Wed, 24 Oct 2007 20:14:20 +0000 Subject: [PATCH] Fix sql bug in vote_monitor svn path=/trunk/boinc/; revision=13949 --- tools/vote_monitor | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/vote_monitor b/tools/vote_monitor index 69e49d0ac9..84e8cb8c24 100755 --- a/tools/vote_monitor +++ b/tools/vote_monitor @@ -44,8 +44,8 @@ if test $sec_from_hour -lt 300 ; then elif `test $ayes -gt $major` ; then echo Vote succeeded. >> $msgfile mail -s "Vote succeeded. You have been banished" $EMAIL < $msgfile2 - start_time=`$MYSQL --execute="select start_time from banishment_votes where voteid=$voteid"` - $MYSQL --execute="update forum_preferences set banished_until=$start_time+1209600 where userid=$userid" + start_time=`$MYSQL --execute="select start_time from banishment_vote where id=$voteid"` + $MYSQL --execute="update forum_preferences set banished_until=$start_time +1209600 where userid= $userid" $MYSQL --execute="update banishment_vote set end_time=start_time where id=$voteid" else $MYSQL --execute="select 'Ends in ',(end_time-$now)/3600,' hours' from banishment_vote where id=$voteid" >> $msgfile @@ -79,8 +79,8 @@ if test -n "$voteids" ; then if test $ayes -gt $nays ; then echo Vote succeeded. >> $msgfile mail -s "Vote succeeded. You have been banished" $EMAIL < $msgfile2 - start_time=`$MYSQL --execute="select start_time from banishment_votes where voteid=$voteid"` - $MYSQL --execute="update forum_preferences set banished_until=$start_time+1209600 where userid=$userid" + start_time=`$MYSQL --execute="select start_time from banishment_vote where id=$voteid"` + $MYSQL --execute="update forum_preferences set banished_until=$start_time +1209600 where userid= $userid" $MYSQL --execute="update banishment_vote set end_time=start_time where id=$voteid" else echo Vote failed. >> $msgfile