? no_more_otf.patch
Index: category_menu.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/category/category_menu/category_menu.install,v
retrieving revision 1.3
diff -u -p -r1.3 category_menu.install
--- category_menu.install	6 Nov 2006 05:46:35 -0000	1.3
+++ category_menu.install	17 Feb 2007 04:36:15 -0000
@@ -70,3 +70,13 @@ function category_menu_update_1() {
 
   return $ret;
 }
+
+/**
+ * Implementation of hook_enable().
+ */
+function category_menu_enable() {
+  // Make us heavy so we happen after menu.module.
+  // This gives us the ability to hide the menu_otf section of the node edit form.
+  db_query("UPDATE {system} SET weight = 10 WHERE name = 'category_menu' AND type = 'module'");
+}
+
Index: category_menu.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/category/category_menu/category_menu.module,v
retrieving revision 1.38
diff -u -p -r1.38 category_menu.module
--- category_menu.module	5 Jan 2007 15:31:15 -0000	1.38
+++ category_menu.module	17 Feb 2007 04:36:15 -0000
@@ -651,3 +651,25 @@ function category_menu_get_mapping($nid,
     return 0;
   }
 }
+
+/**
+ * Implementation of hook_form_alter().
+ * We attempt to hide the menu_otf form to help prevent accidents.
+ */
+function category_menu_form_alter($form_id, &$form) {
+  if (isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) {
+    if(isset($form['menu'])) {
+      foreach (array('title','description','pid','path','weight','mid','type') as $x) {
+        $form['menu'][$x]['#type'] = 'value';
+        if(!isset($form['menu'][$x]['#value'])) {
+          $form['menu'][$x]['#value'] = $form['menu'][$x]['#default_value'];
+        }
+      }
+      unset($form['menu']['delete']);
+      unset($form['menu']['advanced']);
+
+      $form['menu']['#type'] = 'markup';
+      $form['menu']['#value'] = '';
+    }
+  }
+}
