Skip to content
Snippets Groups Projects
Commit 3bbf945a authored by Elmar Ludwig's avatar Elmar Ludwig Committed by Jan-Hendrik Willms
Browse files

ignore EXTERNAL_HELP_LOCATIONID and use only major version, fixes #654

parent f2094cbe
No related branches found
No related tags found
No related merge requests found
...@@ -1005,29 +1005,18 @@ function search_range($search_str = false, $search_user = false, $show_sem = tru ...@@ -1005,29 +1005,18 @@ function search_range($search_str = false, $search_user = false, $show_sem = tru
*/ */
function format_help_url($keyword) function format_help_url($keyword)
{ {
$helppage = $keyword;
// $loc is only set if special help view for installation is known
$loc = "";
$locationid = Config::get()->EXTERNAL_HELP_LOCATIONID;
if ($locationid && $locationid !== 'default') {
$loc = $locationid . '/';
}
// all help urls need short language tag (de, en) // all help urls need short language tag (de, en)
$lang = 'de'; $lang = 'de';
if ($_SESSION['_language']) { if ($_SESSION['_language']) {
[$lang] = explode('_', $_SESSION['_language']); [$lang] = explode('_', $_SESSION['_language']);
} }
// determine Stud.IP version as of MAJOR.MINOR // determine major Stud.IP version from SOFTWARE_VERSION.
// from SOFTWARE_VERSION. That variable MUST match pattern MAJOR.MINOR.* preg_match('/^\d+/', $GLOBALS['SOFTWARE_VERSION'], $v);
preg_match('/^(\d+\.\d+)/', $GLOBALS['SOFTWARE_VERSION'], $v);
$version = $v[0]; $version = $v[0];
$help_query = sprintf('https://hilfe.studip.de/help/%s/%s/%s%s', $help_query = sprintf('https://hilfe.studip.de/help/%s.0/%s/%s',
$version, $lang, $loc, $helppage); $version, $lang, $keyword);
return $help_query; return $help_query;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment