helpbrowser: make online link working for dev versions (after c8073d) 87/21487/2
Samuel GOUGEON [Thu, 4 Jun 2020 23:57:40 +0000 (01:57 +0200)]
Change-Id: I88b97f671b441b913ca17dfd20214baa87fb5442

scilab/modules/helptools/macros/helpbrowser_menus_cb.sci

index bfc1028..3622c3d 100644 (file)
@@ -40,10 +40,15 @@ function helpbrowser_menus_cb(action, param)
             messagebox(msg, "modal")
             return
         end
-        v = getversion("scilab")
-        v = msprintf("%d.%d.%d", v(1),v(2),v(3))
+        v = getversion()
+        if grep(v, "-branch-") <> []
+            v = "current"
+        else
+            v = getversion("scilab")
+            v = msprintf("%d.%d.%d", v(1),v(2),v(3))
+        end
         url = "https://help.scilab.org/docs/%s/%s/%s.html"
-        url = msprintf(url,v, currentLang, id)
+        url = msprintf(url, v, currentLang, id)
         openURL(url)
 
     case "bugs"