Related tdf#123318 Fix filtering with SHARED

Change-Id: Ic704b5ddcc0448a884da4ca01fa54bb94692495f
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/128423
Tested-by: Jenkins
Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com>
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
diff --git a/help3xsl/help.js b/help3xsl/help.js
index 6adbf2e..458c382 100644
--- a/help3xsl/help.js
+++ b/help3xsl/help.js
@@ -52,15 +52,15 @@ function currentModule() {
    // We need to know the module that the user is using when they call for help
    var module = getQuery('DbPAR');
    if (module == null) {
        // get the module name from the URL and remove the first character,
        // but first deal with snowflake Base
        // first deal with snowflake Base
        if(url.indexOf('explorer/database/') !== -1) {
            module = 'BASE';
        } else {
            if (null === regexArray){// comes from search or elsewhere, no defined module in URL
                module = 'HARED'
            if (null === regexArray){
                // comes from search or elsewhere, no defined module in URL
                module = 'SHARED'
            } else {
                module = regexArray[1].toUpperCase().substring(1);
                module = regexArray[1].toUpperCase();
            }
        }
    }
@@ -69,7 +69,7 @@ function currentModule() {
function fullLinkify(indexEl, bookmarks, modules, currentModule) {
    var fullLinkified = '';
    // if user is not on a shared category page, limit the index to the current module + shared
    if(currentModule !== 'HARED') {
    if(currentModule !== 'SHARED') {
        bookmarks = bookmarks.filter(function(obj) {
            return obj['app'] === currentModule || obj['app'] === 'SHARED';
        });
@@ -114,7 +114,7 @@ function filter(indexList) {

    // Similarly to fullLinkify(), limit search results to the user's current module + shared
    // unless they're somehow not coming from a module.
    if(userModule !== 'HARED') {
    if(userModule !== 'SHARED') {
        resultModules = [userModule, 'SHARED'];
    } else {
        resultModules = modules;