mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 06:03:28 +00:00
Add support to modify help text using help_pre_load sub
This commit is contained in:
8
help.cgi
8
help.cgi
@@ -23,6 +23,14 @@ $help = &read_help_file($module, $file);
|
||||
$help || &helperror(&text('help_efile3',
|
||||
&html_escape($file), &html_escape($module)));
|
||||
|
||||
# Modify help file based on module
|
||||
if (&foreign_exists($module) &&
|
||||
&foreign_require($module) &&
|
||||
&foreign_func_exists($module, 'help_pre_load')) {
|
||||
$help =
|
||||
&foreign_call($module, "help_pre_load", $help);
|
||||
}
|
||||
|
||||
# find and replace the <header> section
|
||||
if ($help =~ s/<header>([^<]+)<\/header>//i) {
|
||||
&popup_header($1);
|
||||
|
||||
Reference in New Issue
Block a user