All pastes #426491 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-04-06 05:10 UTC
rendered paste body
function menu_menu($caller = NULL) {
  static $custom_items;
  if (isset($custom_items) && isset($caller) && $caller == 'menu_menu_alter') {
    return $custom_items;
  }
  $custom_items = array();
  $result = db_query('SELECT * FROM {menu_edit} WHERE admin = 1');
  while ($item = db_fetch_array($result)) {
    $custom_items[] = $item['path'];
    $items[$item['path']] = $item;
  }