Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
advanced_help
Commits
15582740
Commit
15582740
authored
Apr 14, 2018
by
emartoni
Committed by
gisle
Apr 14, 2018
Browse files
Issue
#2960283
by emartoni: Fixed missing module error message
parent
ecf5ba78
Changes
1
Hide whitespace changes
Inline
Side-by-side
advanced_help.module
View file @
15582740
...
...
@@ -593,6 +593,16 @@ function advanced_help_get_topic_filename($module, $topic) {
return
"./
$info[path]/$info[file]
"
;
}
}
/**
* Get the module type (theme or module).
*/
function
_advanced_help_get_module_type
(
$module
)
{
$theme_list
=
array_keys
(
list_themes
());
$is_theme
=
in_array
(
$module
,
$theme_list
);
return
$is_theme
?
'theme'
:
'module'
;
}
/**
* Load and render a help topic.
*/
...
...
@@ -605,11 +615,12 @@ function advanced_help_get_topic_file_info($module, $topic) {
}
// Search paths:
$module_type
=
_advanced_help_get_module_type
(
$module
);
$paths
=
array
(
// Allow theme override.
path_to_theme
()
.
'/help'
,
// Translations.
drupal_get_path
(
'
module
'
,
$module
)
.
"/translations/help/
$language->language
"
,
drupal_get_path
(
$
module
_type
,
$module
)
.
"/translations/help/
$language->language
"
,
// In same directory as .inc file.
$info
[
'path'
],
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment