--- /cvs/drupal/contributions/modules/faq/faq.module	2008/10/25 20:39:31	1.1.4.63.2.66
+++ /cvs/drupal/contributions/modules/faq/faq.module	2008/10/26 23:45:32	1.1.4.63.2.68
@@ -16,10 +16,10 @@
 
   switch ($section) {
     case "admin/help#faq":
-      $output .= '<p>'. t("This module allows users with the 'administer faq' permission to create question and answer pairs which will be displayed on the 'faq' page.  The 'faq' page is automatically generated from the FAQ nodes configured and the layout of this page can be modified on the settings page.  Users will need the 'view faq' permission in order to view the 'faq' page.") .'</p>'.
+      $output .= '<p>'. t("This module allows users with the 'administer faq' permission to create question and answer pairs which will be displayed on the 'faq' page.  The 'faq' page is automatically generated from the FAQ nodes configured and the layout of this page can be modified on the settings page.  Users will need the 'view faq page' permission in order to view the 'faq' page.") .'</p>'.
         '<p>'. t("To create a question and answer, the user must create a 'FAQ' node (Create content >> FAQ).  This screen allows the user to edit the question and answer text.  If the 'Taxonomy' module is enabled and there are some terms configured for the FAQ node type, it will also be possible to put the questions into different categories when editing.") .'</p>'.
         '<p>'. t("The 'Frequently Asked Questions' settings configuration screen will allow users with 'administer faq' permissions to specify different layouts of the questions and answers.") .'</p>'.
-        '<p>'. t("All users with 'view faq' permissions will be able to view the generated FAQ page at 'www.example.com/faq'.") .'</p>';
+        '<p>'. t("All users with 'view faq page' permissions will be able to view the generated FAQ page at 'www.example.com/faq'.") .'</p>';
       return $output;
     case "admin/modules#description":
       return t('Allows the user to configure the layout of questions and answers on a FAQ page.');
@@ -33,7 +33,7 @@
  * Implementation of hook_perm().
  */
 function faq_perm() {
-  return array('administer faq', 'view faq', 'edit own faq', 'edit faq', 'create faq');
+  return array('administer faq', 'view faq page', 'edit own faq', 'edit faq', 'create faq');
 }
 
 
@@ -59,23 +59,6 @@
       return TRUE;
     }
   }
-  elseif ($op == 'view') {
-    // No permission to view any faq nodes.
-    if (!user_access('view faq')) {
-      return FALSE;
-    }
-    // Have permission and node is published.
-    elseif ($node->nid && $node->status) {
-      return TRUE;
-    }
-    // Have permission, node is unpublished but it's their node.
-    elseif ($user->uid == $node->uid && $user->uid != 0) {
-      return TRUE;
-    }
-    else {
-      return FALSE;
-    }
-  }
 }
 
 /**
@@ -89,7 +72,7 @@
       'path' => 'faq',
       'title' => variable_get('faq_title', 'Frequently Asked Questions'),
       'callback' => 'faq_page',
-      'access' => user_access('view faq'),
+      'access' => user_access('view faq page'),
       'weight' => 1
     );
 
@@ -99,7 +82,7 @@
         'title' => variable_get('faq_title', 'Frequently Asked Questions'),
         'callback' => 'faq_page',
         'callback arguments' => array(arg(1)),
-        'access' => user_access('view faq'),
+        'access' => user_access('view faq page'),
         'type' => MENU_CALLBACK,
       );
     }
