You are here

function og_menu_update_menu in Organic Groups Menu (OG Menu) 6

Same name and namespace in other branches
  1. 6.2 og_menu.module \og_menu_update_menu()
  2. 7.3 og_menu.module \og_menu_update_menu()
  3. 7.2 og_menu.module \og_menu_update_menu()
2 calls to og_menu_update_menu()
og_menu_edit_menu_form_submit in ./og_menu.module
og_menu_nodeapi in ./og_menu.module
Implementation of hook_nodeapi().

File

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

Code

function og_menu_update_menu($menu_name, $gid = NULL) {

  // Do it the lazy way
  db_query("DELETE FROM {og_menu} WHERE menu_name = '%s'", $menu_name);
  if ($gid) {
    db_query("INSERT INTO {og_menu} (gid, menu_name) VALUES (%d, '%s')", $gid, $menu_name);
  }
}