help3xsl/help.js |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 21f7faaea2017e085b030d4c40c24067e37a1ee5
Author:     Ilmari Lauhakangas <[email protected]>
AuthorDate: Sat Jan 15 01:00:33 2022 +0200
Commit:     Olivier Hallot <[email protected]>
CommitDate: Mon Jan 17 12:38:27 2022 +0100

    Related tdf#123318 Fix harder and update Base URL path
    
    Base Help used to be generated into the path shared/explorer/database
    
    Change-Id: I977dea766c621c0387c78238b65e45b5d4017929
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/128450
    Tested-by: Jenkins
    Reviewed-by: Olivier Hallot <[email protected]>

diff --git a/help3xsl/help.js b/help3xsl/help.js
index 458c382dd..0a7563e3f 100644
--- a/help3xsl/help.js
+++ b/help3xsl/help.js
@@ -50,17 +50,19 @@ function getQuery(q) {
 
 function currentModule() {
     // We need to know the module that the user is using when they call for 
help
-    var module = getQuery('DbPAR');
+    let module = getQuery('DbPAR');
+    let moduleFromURL = regexArray[1].toUpperCase();
     if (module == null) {
         // first deal with snowflake Base
-        if(url.indexOf('explorer/database/') !== -1) {
+        if(url.indexOf('/sdatabase/') !== -1) {
             module = 'BASE';
         } else {
-            if (null === regexArray){
+            if (null === regexArray || moduleFromURL === 'SHARED') {
                 // comes from search or elsewhere, no defined module in URL
                 module = 'SHARED'
             } else {
-                module = regexArray[1].toUpperCase();
+                // drop the 's' from the start
+                module = moduleFromURL.substring(1);
             }
         }
     }

Reply via email to