diff -urNp 47-rev-mod/revision_moderation.info revision_moderation/revision_moderation.info
--- 47-rev-mod/revision_moderation.info	1969-12-31 18:00:00.000000000 -0600
+++ revision_moderation/revision_moderation.info	2007-02-09 23:34:00.000000000 -0600
@@ -0,0 +1,7 @@
+; $Id: revision_moderation.info,v 2.1 2007/01/24 16:56:00 cbutera Exp $
+name = "Revision Moderation"
+description = "Handles the moderation of content before new revisions are published."
+version = "$Name: DRUPAL-5 $"
+package = Administration
+version = "5.x-1.x-dev"
+project = "revision_moderation"
diff -urNp 47-rev-mod/revision_moderation.install revision_moderation/revision_moderation.install
--- 47-rev-mod/revision_moderation.install	2006-10-24 23:19:54.000000000 -0500
+++ revision_moderation/revision_moderation.install	2007-02-09 22:53:00.000000000 -0600
@@ -33,7 +33,7 @@ function revision_moderation_install() {
  */
 function revision_moderation_update_1() {
   $ret = array();
-
+  
   switch ($GLOBALS['db_type']) {
     case 'mysql':
     case 'mysqli':
@@ -55,6 +55,21 @@ function revision_moderation_update_1() 
       ");
       break;
   }
-
+  
   return $ret;
 }
+
+/**
+ * Implementation of hook_install().
+ */
+function revision_moderation_uninstall() {
+  switch ($GLOBALS['db_type']) {
+    case 'mysql':
+    case 'mysqli':
+      db_query("DROP TABLE {revision_moderation}");
+      break;
+    case 'pgsql':
+      db_query("DROP TABLE {revision_moderation}");
+      break;
+  }
+}
diff -urNp 47-rev-mod/revision_moderation.install~ revision_moderation/revision_moderation.install~
--- 47-rev-mod/revision_moderation.install~	1969-12-31 18:00:00.000000000 -0600
+++ revision_moderation/revision_moderation.install~	2007-02-07 23:26:00.000000000 -0600
@@ -0,0 +1,64 @@
+<?php
+// $Id: revision_moderation.install,v 1.1 2006/10/25 04:19:54 webchick Exp $
+
+/**
+ * Implementation of hook_install().
+ */
+function revision_moderation_install() {
+  switch ($GLOBALS['db_type']) {
+    case 'mysql':
+    case 'mysqli':
+      db_query("
+      CREATE TABLE {revision_moderation} (
+        nid int unsigned NOT NULL,
+        revision_moderation int NOT NULL default '0',
+        PRIMARY KEY(nid)
+      ) /*!40100 DEFAULT CHARACTER SET UTF8 */
+      ");
+      break;
+    case 'pgsql':
+      db_query("
+      CREATE TABLE {revision_moderation} (
+        nid int unsigned NOT NULL,
+        revision_moderation int NOT NULL default '0',
+        PRIMARY KEY(nid)
+      ) /*!40100 DEFAULT CHARACTER SET UTF8 */
+      ");
+      break;
+  }
+}
+
+/**
+ * Install revision_moderation table.
+ */
+function revision_moderation_update_1() {
+  $ret = array();
+
+  switch ($GLOBALS['db_type']) {
+    case 'mysql':
+    case 'mysqli':
+      $ret[] = update_sql("
+      CREATE TABLE {revision_moderation} (
+        nid int unsigned NOT NULL,
+        revision_moderation int NOT NULL default '0',
+        PRIMARY KEY(nid)
+      ) /*!40100 DEFAULT CHARACTER SET UTF8 */
+      ");
+      break;
+    case 'pgsql':
+      $ret[] = update_sql("
+      CREATE TABLE {revision_moderation} (
+        nid int unsigned NOT NULL,
+        revision_moderation int NOT NULL default '0',
+        PRIMARY KEY(nid)
+      ) /*!40100 DEFAULT CHARACTER SET UTF8 */
+      ");
+      break;
+  }
+
+  return $ret;
+}
+
+function revision_moderation_uninstall() {
+  
+}
diff -urNp 47-rev-mod/revision_moderation.module revision_moderation/revision_moderation.module
--- 47-rev-mod/revision_moderation.module	2007-02-11 16:39:17.000000000 -0600
+++ revision_moderation/revision_moderation.module	2007-02-12 21:12:00.000000000 -0600
@@ -1,5 +1,9 @@
 <?php
-// $Id: revision_moderation.module,v 1.20.2.1 2007/02/11 22:39:17 webchick Exp $
+// $Id: revision_moderation.module,v 1.19 2006/11/04 17:27:39 webchick Exp $
+
+// Why are lines: 175 115 so much alike...
+// Admin shouldn't have to get approval!
+
 
 /**
  * @file
@@ -7,7 +11,7 @@
  */
 
 // Actions module support.
-if (module_exist('actions')) {
+if (module_exists('actions')) {
   include_once 'revision_moderation_actions.inc';
 }
 
@@ -17,7 +21,12 @@ if (module_exist('actions')) {
 function revision_moderation_help($section) {
   switch ($section) {
     case 'admin/modules#description':
+      return t('Handles the moderation of unpublished revisions.');
+      break;
+    case 'admin/help#revision_moderation':
       return t('Allows moderation of new node revisions while existing approved revisions stay visible.');
+      // Where and when does this even display ^^
+      break;
   }
 }
 
@@ -53,26 +62,64 @@ function revision_moderation_menu($may_c
       );
     }
   }
-
+  
+  $items[] = array(
+    'path' => 'admin/settings/revision_moderation',
+    'title' => t('Configure Settings'),
+    'callback' => 'drupal_get_form',
+    'callback arguments' => 'revision_moderation_admin',
+    'access' => user_access('access administration pages'),
+    'type' => MENU_NORMAL_ITEM,
+  );
+  
   return $items;
 }
 
+function revision_moderation_admin() {
+  $form['revision_moderation_settings'] = array(
+    '#type' => 'fieldset',
+    '#weight' => -20,
+    '#title' => t('Revision Moderation Settings'),
+    '#collapsible' => FALSE,
+    '#collapsed' => FALSE
+  );
+  
+  $form['revision_moderation_settings']['admin_bypass_queue'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('The admin user does not have to wait for approval.'),
+    '#default_value' => variable_get('revision_moderation_admin_bypass_queue', 1),
+    '#description' => t('Checking this box allows the admin to bypass the queue; The admin\'s edits go into effect immediately')
+  );
+  
+  return system_settings_form($form);
+}
+
 /**
  * Implementation of hook_form_alter().
  */
 function revision_moderation_form_alter($form_id, &$form) {
-  // On node settings or node edit forms, add in the "New revisions in moderation" option.
-  if (isset($form['type'])) {
+  // On node settings add in the "New revisions in moderation" option...
+  $node_type = $form['old_type']['#value'];
+  
+  if ($form_id == 'node_type_form') {
+    $form['workflow']['revision_moderation'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('New revisions must be in moderation'),
+      '#default_value' => variable_get('revision_moderation_'. $node_type, 0),
+      '#description' => t('Users with the administer nodes permission will be able to override these options.'),
+    );
+  }
+    
+  if (isset($form['type'])) { 
     $type = $form['type']['#value'];
-    if ($type .'_node_settings' == $form_id) {
-      $form['workflow']["node_options_$type"]['#options']['revision_moderation'] = t('New revisions in moderation');
-    }
-    elseif ($type .'_node_form' == $form_id) {
+    if ($type .'_node_form' == $form_id) {
       if ($form['nid']['#value']) {
         $default_value = db_result(db_query('SELECT revision_moderation FROM {revision_moderation} WHERE nid = %d', $form['nid']['#value'])); 
       }
       else {
-        $default_value = in_array('revision_moderation', variable_get("node_options_$type", array('status', 'promote')));
+        // BEFORE ME: $default_value = in_array('revision_moderation', variable_get("node_options_$type", array('status', 'promote')));
+        $default_value = variable_get('revision_moderation_'. $node_type, 0);
+        // sorry, I don't know what the other function originally did!!!  what is the purpose of the in_array() function??
       }
 
       // Only show the checkbox if user has 'administer nodes' privileges.
@@ -84,15 +131,15 @@ function revision_moderation_form_alter(
         );
       }
       else {
-        $form['revision_moderation'] = array(
+        $form['options']['revision_moderation'] = array(
           '#type' => 'value',
           '#value' => $default_value,
         );
       }
-
+      
       // If node does not already have a 'log' field (book, page),
-      // and has revisions enabled, then add field.
-      if (!isset($form['log']) && in_array('revision', variable_get("node_options_$type", array('status', 'promote')))) {
+      // then add it.
+      if (!isset($form['log'])) {
         $form['revision_moderation_log'] = array(
           '#type' => 'textarea',
           '#title' => t('Log message'),
@@ -156,7 +203,7 @@ function revision_moderation_nodeapi(&$n
       case 'view':
         // Notify admin that a node has pending revisions.
         if (user_access('view revisions') && arg(2) != 'revisions' && revision_moderation_get_node_pending_revisions($node->nid)) {
-          drupal_set_message(t('This post has one or more pending revisions: <a href="%list">view list of revisions</a>.', array('%list' => url("node/$node->nid/revisions"))));
+          drupal_set_message(t('This post has one or more pending revisions: <a href="@url">view list of revisions</a>.', array('@url' => url("node/$node->nid/revisions"))));
         }
         break;
       case 'prepare':
@@ -180,7 +227,8 @@ function revision_moderation_nodeapi(&$n
       case 'update':
         if (isset($node->original_node)) {
           // Update node table's vid to the original value.
-          db_query("UPDATE {node} SET vid = %d, title = '%s', status = %d, moderate = %d WHERE nid = %d", $node->original_node->vid, $node->original_node->title, $node->original_node->status, $node->original_node->moderate, $node->nid);
+          db_query('UPDATE {node} SET vid = %d, status = %d, moderate = %d WHERE nid = %d', $node->original_node->vid, $node->original_node->status, $node->original_node->moderate, $node->nid);
+          // the moderate bit is depreciated above as of 5.0
           drupal_set_message(t('Your changes have been submitted for moderation.'));
         }
         break;
