You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@steve.apache.org by ji...@apache.org on 2015/03/17 14:07:31 UTC

svn commit: r1667294 - /steve/trunk/www/cgi-bin/cast-vote.pl

Author: jim
Date: Tue Mar 17 13:07:30 2015
New Revision: 1667294

URL: http://svn.apache.org/r1667294
Log:
Use steve.pm version

Modified:
    steve/trunk/www/cgi-bin/cast-vote.pl

Modified: steve/trunk/www/cgi-bin/cast-vote.pl
URL: http://svn.apache.org/viewvc/steve/trunk/www/cgi-bin/cast-vote.pl?rev=1667294&r1=1667293&r2=1667294&view=diff
==============================================================================
--- steve/trunk/www/cgi-bin/cast-vote.pl (original)
+++ steve/trunk/www/cgi-bin/cast-vote.pl Tue Mar 17 13:07:30 2015
@@ -231,18 +231,11 @@ sub fetch_voter {
     my $issue_id = eval { filestuff("$VOTE_ISSUEDIR/$group/$issue/issue") }
         or return;
     for my $voter (eval { get_group("$VOTE_ISSUEDIR/$group/voters") }) {
-        return $voter if mget_hash_of("$issue_id:$voter") eq $hash;
+        return $voter if get_hash_of("$issue_id:$voter") eq $hash;
     }
     return;
 }
 
-sub mget_hash_of {
-    my ($item) = @_;
-    my $md5 = Digest::MD5->new;
-    $md5->add($item);
-    return $md5->hexdigest;
-}
-
 sub yna_form {
     my ($voter, $issue_name, $issue_content, $trailer) = @_;
     my $other_issues = other_issues($issue_name, $voter);
@@ -531,7 +524,7 @@ sub other_issues {
 
     for my $issue (sort grep /^\d+-\w+$/, readdir $dir) {
         my $issue_id = filestuff("$VOTE_ISSUEDIR/$group/$issue/issue");
-        my $hash = mget_hash_of("$issue_id:$voter");
+        my $hash = get_hash_of("$issue_id:$voter");
         $html .= "$group-$issue" eq $issue_name
             ?  qq(<li>$issue</li>\n)
                 : qq(<li><a href="/cast/$group-$issue/$hash">$issue</a></li>\n);