mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2012-07-21 02:35 am

[dw-free] poll responder list sorts by userid, not chronological by response order

[commit: http://hg.dwscoalition.org/dw-free/rev/267bb682c94f]

http://bugs.dwscoalition.org/show_bug.cgi?id=4286

Sort poll respondants by datetime answered

Patch by [personal profile] swaldman.

Files modified:
  • cgi-bin/LJ/Poll.pm
--------------------------------------------------------------------------------
diff -r 1bfe3ee0a558 -r 267bb682c94f cgi-bin/LJ/Poll.pm
--- a/cgi-bin/LJ/Poll.pm	Fri Jul 20 19:29:50 2012 -0700
+++ b/cgi-bin/LJ/Poll.pm	Fri Jul 20 19:39:16 2012 -0700
@@ -1371,7 +1371,8 @@
     my $pollid = $self->pollid;
 
     my @res = @{ $self->journal->selectall_arrayref(
-        "SELECT DISTINCT(userid) FROM pollresult2 WHERE pollid=? AND journalid=? ",
+        "SELECT userid FROM pollsubmission2 WHERE " .
+        "pollid=? AND journalid=? ORDER BY datesubmit ",
         undef, $pollid, $self->journalid ) };
     my @respondents = map { $_->[0] } @res;
 
--------------------------------------------------------------------------------