? modr8_0.patch
? modr8_47_publish_1.patch
Index: modr8.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/modr8/modr8.module,v
retrieving revision 1.1.2.5
diff -u -p -r1.1.2.5 modr8.module
--- modr8.module	5 Jan 2007 01:59:15 -0000	1.1.2.5
+++ modr8.module	9 Feb 2007 02:39:52 -0000
@@ -66,10 +66,18 @@ function modr8_settings() {  
 
   $form['modr8_nodes_per_page'] = array(
     '#type' => 'select',
-    '#title' => t('How many nodes should be displayed per page?'),
+    '#title' => t('How many posts should be displayed per page?'),
     '#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_publish'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Publish approved posts'),
+    '#default_value' => variable_get('modr8_publish', FALSE),
+    '#description' => t('When the moderator approves a post, publish it if the post is currently unpublished.'),
+  );
+  
   $form['text'] = array(
     '#type' => 'fieldset',
     '#title' => t('email'),
@@ -259,7 +267,8 @@ function moder8_form_submit($form_id, $f
         if(variable_get('modr8_send_approve', FALSE)){
           modr8_usermail('approve', $nid, $values);
         }
-        db_query('UPDATE {node} SET moderate = 0 WHERE nid = %d', $nid);
+        $publish = variable_get('modr8_publish', FALSE) ? ', status = 1' : ''; 
+        db_query("UPDATE {node} SET moderate = 0". $publish ." WHERE nid = %d", $nid);
         cache_clear_all();
         drupal_set_message(t('The %type %title has been approved.', array('%title' => theme('placeholder', $values['title']), '%type' => $values['type'])));
         break;
