--- pollfield.module	2007-04-09 23:53:12.000000000 +0800
+++ pollfield.module	2008-02-21 19:13:57.000000000 +0800
@@ -432,9 +432,8 @@ function pollfield_menu($may_cache) {
     // We put this in !$may_cache so it's only added once per request
     drupal_add_css(drupal_get_path('module', 'pollfield') .'/pollfield.css');
     if (arg(0) == 'node' && is_numeric(arg(1))) {
-      if ($result = db_fetch_array(db_query("SELECT DISTINCT nid FROM {pollfield}"))) {
-        $pollfields = array_filter((array) $result);
-        if (in_array(arg(1), $pollfields)) {
+      $nid = db_result(db_query('SELECT DISTINCT nid FROM {pollfield} WHERE nid = %d', arg(1)));
+      if (isset($nid) && $nid == arg(1)) {
           $items[] = array(
             'path' => 'node/'. arg(1) .'/results',
             'title' => t('Results'),
@@ -454,7 +453,6 @@ function pollfield_menu($may_cache) {
         }
       }
     }
-  }
   return $items;
 }
 
