wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[livejournal] r18778: LJSV-1467. Minor fix

Committer: gprochaev
LJSV-1467. Minor fix

U   trunk/cgi-bin/LJ/Poll.pm
Modified: trunk/cgi-bin/LJ/Poll.pm
===================================================================
--- trunk/cgi-bin/LJ/Poll.pm	2011-04-04 05:55:50 UTC (rev 18777)
+++ trunk/cgi-bin/LJ/Poll.pm	2011-04-04 06:23:10 UTC (rev 18778)
@@ -750,7 +750,6 @@
     return 0 unless $comm;
 
     ## Check for all maintainers have already voted
-    my $dbr = LJ::get_db_reader();
     my $sth;
     my @questions = $self->questions;
 
@@ -771,6 +770,7 @@
         $sth = $self->journal->prepare("SELECT value, userid FROM pollresult2 WHERE pollid=? AND pollqid=? AND journalid=?");
         $sth->execute($self->pollid, $qid, $self->journalid);
     } else {
+        my $dbr = LJ::get_db_reader();
         $sth = $dbr->prepare("SELECT value, userid FROM pollresult WHERE pollid=? AND pollqid=?");
         $sth->execute($self->pollid, $qid);
     }

Tags: livejournal, pm, wisest-owl
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments