Commit 81b05c67 authored by Dries's avatar Dries

- Don't report duplicate entries - it is an OK thing to do.

parent 6db29f35
......@@ -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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment