Commit bcde0a2e authored by Jiri Baum's avatar Jiri Baum
Browse files

License metadata - allow non-form-specific element help texts. (Bug #1095499)



Change the help text handling so that when a help text is not found for a
specific form/element combination, it also looks for a wildcard ANY/element
help text.

This is used by the license metadata feature to provide uniform help text for
the license fields on all forms where they appear.

Change-Id: I4c3f1a38d81ae54081e555b2296d28955329cf77
Signed-off-by: default avatarJiri Baum <jiri@catalyst-au.net>
parent 1ddebc03
...@@ -421,6 +421,12 @@ function get_helpfile_location($plugintype, $pluginname, $form, $element, $page= ...@@ -421,6 +421,12 @@ function get_helpfile_location($plugintype, $pluginname, $form, $element, $page=
return $langfile; return $langfile;
} }
} }
// if it's a form element, try the wildcard form name
if (!empty($form) && !empty($element) && $form !== 'ANY') {
return get_helpfile_location('core', '', 'ANY', $element, $page, $section);
}
return false; return false;
} }
......
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