Warn user when adminmenu_custom is going to emit duplicate entries (bug 3894, r=pred).
This commit is contained in:
parent
38a5a4b97b
commit
b43c8c018b
@ -129,6 +129,9 @@ BuildDynamicMenu()
|
|||||||
name);
|
name);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
decl String:category_name[NAME_LENGTH];
|
||||||
|
strcopy(category_name, sizeof(category_name), buffer);
|
||||||
|
|
||||||
if (!KvGotoFirstSubKey(kvMenu))
|
if (!KvGotoFirstSubKey(kvMenu))
|
||||||
{
|
{
|
||||||
@ -306,14 +309,17 @@ BuildDynamicMenu()
|
|||||||
decl String:locString[10];
|
decl String:locString[10];
|
||||||
IntToString(location, locString, sizeof(locString));
|
IntToString(location, locString, sizeof(locString));
|
||||||
|
|
||||||
AddToTopMenu(hAdminMenu,
|
if (AddToTopMenu(hAdminMenu,
|
||||||
buffer,
|
buffer,
|
||||||
TopMenuObject_Item,
|
TopMenuObject_Item,
|
||||||
DynamicMenuItemHandler,
|
DynamicMenuItemHandler,
|
||||||
categoryId,
|
categoryId,
|
||||||
admin,
|
admin,
|
||||||
ADMFLAG_GENERIC,
|
ADMFLAG_GENERIC,
|
||||||
locString);
|
locString) == INVALID_TOPMENUOBJECT)
|
||||||
|
{
|
||||||
|
LogError("Duplicate command name \"%s\" in adminmenu_custom.txt category \"%s\"", buffer, category_name);
|
||||||
|
}
|
||||||
|
|
||||||
} while (KvGotoNextKey(kvMenu));
|
} while (KvGotoNextKey(kvMenu));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user