Menu

#3525 savePollQuestion

Slash 2.5/3.0
open
5
2005-11-21
2005-11-21
shane
No

savePollQuestion in DB/MySQL/MySQL.pm has a problem in that on
pollsave, it's doing the following:

# Go on and unset any reference to the qid in sections, if it
# needs to exist the next statement will correct this. -Brian
$self->sqlUpdate('sections', { qid => '0' }, " qid = $poll->{qid} ")
if $poll->{qid};

if ($poll->{qid} && $poll->{polltype} eq "section" && $poll->
{date} le $self->getTime()) {
$self->setSection($poll->{section}, { qid => $poll->{qid} });
}

This breaks anything that calls it, because sections don't exist
anymore:

Error:Slash::DB::Utility:/Library/Perl/5.8.6/darwin-thread-multi-2level/
Slash/DB/Utility.pm:959:virtuser='slash' -- hostinfo='Localhost via
UNIX socket' -- Table 'slash.sections' doesn't exist -- UPDATE sections
SET qid = '0' WHERE qid = 3
Which was called by:Slash::DB::MySQL:/Library/Perl/5.8.6/darwin-
thread-multi-2level/Slash/DB/MySQL.pm:4112
Error:Slash::DB::MySQL:/Library/Perl/5.8.6/darwin-thread-
multi-2level/Slash/DB/MySQL.pm:4115:setSection called
Which was called by:Slash::Debate:/Library/Perl/5.8.6/Slash/
Debate.pm:361
Error:Slash::DB::Utility:/Library/Perl/5.8.6/darwin-thread-multi-2level/
Slash/DB/Utility.pm:959:virtuser='slash' -- hostinfo='Localhost via
UNIX socket' -- Table 'slash.sections' doesn't exist -- UPDATE sections
SET qid = '3' WHERE section='articles'
Which was called by:Slash::DB::MySQL:/Library/Perl/5.8.6/darwin-
thread-multi-2level/Slash/DB/MySQL.pm:12153
got qid: 3

where this is a little tricky is that the skins table doesn't have a .qid or
current_qid... it's in topic_nexus. I was gonna submit a diff real quick
for this, but it's looking rather complicated for 1:30am, so I'll pass this
on to y'all.

Discussion


Log in to post a comment.