Commit d99c042b authored by Hugh Davenport's avatar Hugh Davenport
Browse files

Fix pieform help on blocktypes within artefacts



Bug #796380

Change-Id: I79d897fd8f5588213f1b9f6e57fee8929068a53a
Signed-off-by: default avatarHugh Davenport <hugh@catalyst.net.nz>
parent cd7c4687
...@@ -289,7 +289,28 @@ function get_helpfile_location($plugintype, $pluginname, $form, $element, $page= ...@@ -289,7 +289,28 @@ function get_helpfile_location($plugintype, $pluginname, $form, $element, $page=
return $langfile; return $langfile;
} }
if ($plugintype != 'core') { if ($plugintype == 'blocktype') { // these are a bit of a special case
$bits = explode('/', $pluginname);
if (count($bits) == 2) {
$location = 'artefact/' . $bits[0] . '/blocktype/' . $bits[1] . '/lang/';
}
else {
try {
if ($artefactplugin = blocktype_artefactplugin($pluginname)) {
$location = 'artefact/' . $artefactplugin . '/blocktype/' . $pluginname . '/lang/';
}
else {
$location = 'blocktype/' . $pluginname . '/lang/';
}
}
catch (SQLException $e) {
if (get_config('installed')) {
throw $e;
}
}
}
}
else if ($plugintype != 'core') {
$location = $plugintype . '/' . $pluginname . '/lang/'; $location = $plugintype . '/' . $pluginname . '/lang/';
} }
else { else {
......
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