Commit b456f3ff98910b0acab7aad60322d1c25558c81a

Authored by bshuttle
1 parent 224025c7

further extension to help - work better if no fs-version is available in the

chosen lang.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5515 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 9 additions and 2 deletions
lib/help/help.inc.php
... ... @@ -180,6 +180,7 @@ class KTHelp {
180 180 $sPluginName = $aParts[0];
181 181 $sSubLocation = implode('/', array_slice($aParts, 1));
182 182  
  183 + // always use the "correct" internal name
183 184 $sInternalName = sprintf("%s/%s/%s", $sPluginName, $sLangCode, $sSubLocation);
184 185  
185 186 // this is a pseudo-name. essentially, this maps to the canonical
... ... @@ -187,11 +188,17 @@ class KTHelp {
187 188  
188 189 //$sBaseDir = sprintf("%s/kthelp/%s/%s", KT_DIR, $sPluginName, $sLangCode);
189 190 $sBaseDir = $oHelpReg->getBaseDir($sPluginName, $sLangCode);
190   -
191 191 if (PEAR::isError($sBaseDir)) {
192 192 if (!$bFailOK) { return $sBaseDir; }
193 193 else {
194   - $sExternalName = '';
  194 + // try in english
  195 + $sAltBase = $oHelpReg->getBaseDir($sPluginName, 'en');
  196 + if (PEAR::isError($sAltBase)) {
  197 + // nothing, even in anglais.
  198 + $sExternalName = '';
  199 + } else {
  200 + $sExternalName = sprintf("%s/%s", $sAltBase, $sSubLocation);
  201 + }
195 202 }
196 203 } else {
197 204 $sExternalName = sprintf("%s/%s", $sBaseDir, $sSubLocation);
... ...