function menu_get_names in Drupal 6
Same name and namespace in other branches
- 7 includes/menu.inc \menu_get_names()
Build a list of named menus.
Related topics
File
- includes/
menu.inc, line 1212 - API for the Drupal menu system.
Code
function menu_get_names($reset = FALSE) {
static $names;
if ($reset || empty($names)) {
$names = array();
$result = db_query("SELECT DISTINCT(menu_name) FROM {menu_links} ORDER BY menu_name");
while ($name = db_fetch_array($result)) {
$names[] = $name['menu_name'];
}
}
return $names;
}