--- faq_ask_orig.module	2009-10-21 23:11:46.000000000 -0500
+++ faq_ask.module	2010-02-22 10:13:29.000000000 -0600
@@ -132,8 +132,40 @@ function faq_ask_menu() {
 /**
  * Get the ask question form.
  */
-function faq_ask_page($tid = NULL) {
-  drupal_goto('node/add/faq', 'ask=true');
+function faq_ask_page() {
+  
+  // we can't just call node_add(),
+  // because we don't want the access checking.
+  
+  global $user;
+  
+  // Initialize settings:
+  $node_array = array(
+    'uid' => $user->uid,
+    'name' => (isset($user->name) ? $user->name : ''),
+    'type' => 'faq',
+    'language' => ''
+  );
+  
+  module_load_include('inc', 'node', 'node.pages');
+  return drupal_get_form('faq_node_form', $node_array);
+}
+
+
+/**
+ * Disable undesired form elements
+ * that you are not supposed to see on a faq_ask page.
+ */
+function faq_ask_disable_form_elements(&$form) {
+  foreach (array(
+    'revision_information',
+    'path',
+    'author',
+    'options',
+  ) as $key) {
+    $form[$key]['#type']= 'value';
+  }
+  return $form;
 }
 
 /**
@@ -161,15 +193,15 @@ function faq_ask_edit($node) {
  * Implementation of hook_form_alter().
  *  This is how we build the "ask question" form.
  */
-function faq_ask_form_alter(&$form, $form_state, $form_id) {
-  if ($form_id != 'faq_node_form' || !isset($_GET['ask'])) {
-      return;
-    }
-  if ($_GET['ask'] != 1 && $_GET['ask'] != 'true') {
+function faq_ask_form_faq_node_form_alter(&$form, $form_state) {
+  
+  if (user_access('answer question') && $_GET['q'] != 'faq_ask') {
     return;
   }
-
-  drupal_set_title(t('Ask a Question'));
+  
+  
+  $form['#after_build'][] = 'faq_ask_disable_form_elements';
+  
   // Set the published field off and make sure they can't override it.
   $form['options']['status']['#default_value'] = FALSE;
   $form['options']['status']['#disabled'] = TRUE;
@@ -181,11 +213,22 @@ function faq_ask_form_alter(&$form, $for
   if (variable_get('faq_ask_categorize', FALSE)) {
     unset($form['taxonomy']);
   }
-  $form['body'] = array('#type' => 'value', '#value' => variable_get('faq_ask_unanswered', t('Not answered yet.')));
+  $form['body'] = array(
+    '#type' => 'value',
+    '#value' => variable_get('faq_ask_unanswered', t('Not answered yet.'))
+  );
 
   // Make sure we know we came from here.
-  $form['faq_ask'] = array('#type' => 'value', '#value' => TRUE);
+  $form['faq_ask'] = array(
+    '#type' => 'value',
+    '#value' => TRUE,
+  );
   $form['#submit'][] = 'faq_ask_submit';
+  
+  //Modification made 2/19/2010 by Sean Corrales.
+  //Redirects user back to FAQ page rather than the newly created node that they
+  //cannot access.
+  $form['#redirect'] = 'faq';
 }
 
 function faq_ask_submit($form, &$form_state) {
@@ -202,6 +245,7 @@ function faq_ask_submit($form, &$form_st
   else {
     $category = 0;  // 0 is default expert.
   }
+
   // Are we notifying the expert(s)?
   if (variable_get('faq_ask_notify', FALSE)) {
     $params = array(
@@ -865,7 +909,7 @@ function faq_ask_block($op = 'list', $de
         case 1:
           // Ask a question block.
           if (user_access('ask question')) {
-            $block['content'] = faq_ask_page(NULL);
+            $block['content'] = faq_ask_block_content();
           }
 
       } // end switch($delta).
