Index: decisions.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/decisions/decisions.module,v
retrieving revision 1.77
diff -u -F^f -r1.77 decisions.module
--- decisions.module	9 Oct 2006 00:02:14 -0000	1.77
+++ decisions.module	9 Oct 2006 00:07:49 -0000
@@ -433,6 +438,18 @@ function decisions_view(&$node, $teaser 
 		$node->mode = arg(3);
 	}
 
+	// Record the vote if they voted
+  $valid = FALSE;
+  if ($_POST['op'] == t('Vote')) {
+    // decision_vote will return FALSE on error
+    $valid = decisions_vote_validate($node);
+    if ($valid) {
+      drupal_set_message(t("Your vote was registered."));
+      decisions_vote($node);
+    }
+  }
+
+
 	if ($node->in_preview) {
 		// Copy the form values to the options array
 		$node->option = array();
@@ -453,17 +470,8 @@ function decisions_view(&$node, $teaser 
 		// show results only if the user has voted or decision is closed
     $output .= decisions_view_results($node, $teaser, $page, $block);
   }
-  else { // otherwise, show the vote form or record vote
-    $valid = FALSE;
-    if ($_POST['op'] == t('Vote')) {
-      // decision_vote will return FALSE on error
-      $valid = decisions_vote_validate($node);
-      if ($valid) {
-        drupal_set_message(t("Your vote was registered."));
-        decisions_vote($node);
-      }
-    }
-    if (!$valid && decisions_eligible($node)) {
+  else { // otherwise, show the vote form
+       if (!$valid && decisions_eligible($node)) {
       $output .= decisions_view_voting($node, $teaser, $page, $block);
     }
   }
