- Don't report duplicate entries - it is an OK thing to do.
parent
6db29f35e9
commit
81b05c6795
|
@ -4,10 +4,7 @@
|
|||
function menu($path, $title, $callback = NULL, $help = NULL, $weight = 0, $hidden = 0) {
|
||||
global $_gmenu;
|
||||
|
||||
if (isset($_gmenu[$path])) {
|
||||
trigger_error("trying to add '$path' which already exists");
|
||||
}
|
||||
else {
|
||||
if (empty($_gmenu[$path])) {
|
||||
// add the menu to the flat list of menu items:
|
||||
$_gmenu[$path] = array("title" => $title, "callback" => $callback, "help" => $help, "weight" => $weight, "hidden" => $hidden, "children" => array());
|
||||
|
||||
|
|
Loading…
Reference in New Issue