--- userpoints_nodelimit.module	Sun Oct 14 15:33:38 2007
+++ userpoints_nodelimit_new.module	Sun Jun 01 14:56:56 2008
@@ -27,12 +27,7 @@
   if (isset($form['type']) &&  $form['type']['#value'] .'_node_form' == $form_id) {
-    $node = $form['#node'];      
+    $node = $form['#node'];
     if (!$node->nid && !user_access('administer nodes') && userpoints_nodelimit_check($node->type) == FALSE) {
       drupal_set_message(t("You don't have enough points to create more nodes of this type."), 'error');
-      //destory the form
-      $form = NULL;
-      //return a simple hidden field so that function doesn't fail
-      $form['dummy'] = array(
-        '#type' => 'hidden',
-        '#default_value' => '',
-      );
+      // Remove the buttons so that the form cannot be submitted.
+      $form['buttons'] = array();
      }
