You are here

function og_menu_update_menu in Organic Groups Menu (OG Menu) 7.3

Same name and namespace in other branches
  1. 6.2 og_menu.module \og_menu_update_menu()
  2. 6 og_menu.module \og_menu_update_menu()
  3. 7.2 og_menu.module \og_menu_update_menu()

Updates internal record of group's menu id.

3 calls to og_menu_update_menu()
og_menu_edit_menu_form_submit in ./og_menu.module
Submit handler used on various forms.
og_menu_node_insert in ./og_menu.module
Implements hook_node_insert().
og_menu_node_update in ./og_menu.module
Implements hook_node_update().

File

./og_menu.module, line 924
Integrates Menu with Organic Groups. Lots of menu forms duplication in OG context.

Code

function og_menu_update_menu($menu_name, $gid, $group_type) {
  db_merge('og_menu')
    ->key(array(
    'menu_name' => $menu_name,
  ))
    ->fields(array(
    'gid' => $gid,
    'group_type' => $group_type,
  ))
    ->execute();
}