mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Remove redundant script key
The script file name is used as the key
This commit is contained in:
parent
cfc1f0fe57
commit
9b5be79b1d
50 changed files with 2 additions and 81 deletions
|
|
@ -375,16 +375,8 @@ function user_scripts.load(script_type, ifid, subdir, hook_filter, ignore_disabl
|
|||
goto next_module
|
||||
end
|
||||
|
||||
if(user_script.key == nil) then
|
||||
traceError(TRACE_ERROR, TRACE_CONSOLE, string.format("Missing 'key' in user script '%s'", mod_fname))
|
||||
goto next_module
|
||||
end
|
||||
|
||||
-- TODO remove key
|
||||
if(user_script.key ~= mod_fname) then
|
||||
traceError(TRACE_ERROR, TRACE_CONSOLE, string.format("Module '%s' must correspond to script name '%s'", user_script.key, mod_fname))
|
||||
goto next_module
|
||||
end
|
||||
-- Key is an alias for the module name
|
||||
user_script.key = mod_fname
|
||||
|
||||
if(rv.modules[user_script.key]) then
|
||||
traceError(TRACE_ERROR, TRACE_CONSOLE, string.format("Skipping duplicate module '%s'", user_script.key))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue