I am not the menu expert here, so I am sure that there is something wrong with my little change:

function menu_overview_form_submit($form, &$form_state) {

  // When dealing with saving menu items, the order in which these items are

  // saved is critical. If a changed child item is saved before its parent,

  // the child item could be saved with an invalid path past its immediate

  // parent. To prevent this, save items in the form in the same order they

  // are sent by $_POST, ensuring parents are saved first, then their children.

  // See http://drupal.org/node/181126#comment-632270

  $order = array_flip(array_keys($form['#post'])); // Get the $_POST order.

  $form = array_merge($order, $form); // Update our original form with the new order.

 

  $updated_items = array();

  $fields = array('expanded', 'weight', 'plid');

  foreach (element_children($form) as $mlid) {

    if (isset($form[$mlid]['#item'])) {

      $element = $form[$mlid];

      // Update any fields that have changed in this menu item.

      foreach ($fields as $field) {

        if ($element[$field]['#value'] != $element[$field]['#default_value']) {

          $element['#item'][$field] = $element[$field]['#value'];

          $updated_items[$mlid] = $element['#item'];

          $updated_items[$mlid]['customized'] = $field == 'plid';       // ß only “plid” is really customized.

        }

      }

      // Hidden is a special case, the value needs to be reversed.

      if ($element['hidden']['#value'] != $element['hidden']['#default_value']) {

        $element['#item']['hidden'] = !$element['hidden']['#value'];

        $updated_items[$mlid] = $element['#item'];

      }

    }

  }

 

  // Save all our changed items to the database.

  foreach ($updated_items as $item) {

//    $item['customized'] = 1;

    menu_link_save($item);

  }

}

 

Frankly, I don’t think “expanded” is really customized either.

 

I tested this on my dev site and got the results I want.  So now Karoly or Earl will tell this ditzy blonde why this is not the solution.

 

Nancy E. Wichmann, PMP

Injustice anywhere is a threat to justice everywhere. - Martin L. King, Jr.