? hide-unpublished-230270-2-5x.patch
? hide-unpublished-230270-2.patch
Index: modr8.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/modr8/modr8.module,v
retrieving revision 1.5.2.12
diff -u -p -r1.5.2.12 modr8.module
--- modr8.module	16 Aug 2007 02:58:04 -0000	1.5.2.12
+++ modr8.module	5 Mar 2008 19:19:45 -0000
@@ -191,8 +191,9 @@ function modr8_page() {
   require_once drupal_get_path('module', 'modr8'). '/modr8_admin.inc';
 
   $is_published = '';
-  if (!user_access('administer nodes')) {
-    // Users who don't have the 'administer nodes' permission can only see published nodes.
+  if (!user_access('administer nodes') || variable_get('modr8_hide_unpublished', FALSE)) {
+    // Users who don't have the 'administer nodes' permission can only see published nodes,
+    // or some sites don't want to moderate unpublished nodes.
     $is_published = 'n.status = 1 AND ';
   }
   $count_sql = db_rewrite_sql('SELECT COUNT(*) FROM {node} n WHERE '. $is_published .' n.moderate = 1');
Index: modr8_admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/modr8/modr8_admin.inc,v
retrieving revision 1.2.2.11
diff -u -p -r1.2.2.11 modr8_admin.inc
--- modr8_admin.inc	13 Dec 2007 00:58:46 -0000	1.2.2.11
+++ modr8_admin.inc	5 Mar 2008 19:19:46 -0000
@@ -20,6 +20,11 @@ function modr8_settings_form() {  
     '#options' => drupal_map_assoc(array(5, 10, 15, 20, 25, 50, 75, 100, 150, 200)),
     '#default_value' => variable_get('modr8_nodes_per_page', 10),
   );
+  $form['modr8_hide_unpublished'] = array(
+    '#type' => 'checkbox',
+    '#title' => t("Hide unpublished posts; don't show them in the queue even for admins who can view them."),
+    '#default_value' => variable_get('modr8_hide_unpublished', FALSE),
+  );
   $period = drupal_map_assoc(array(86400, 172800, 259200, 604800, 1209600, 2419200, 4838400, 7257600), 'format_interval');
   $period[0] = t('Never');
   $form['modr8_log_clear'] = array(
