Commit 430f8dcf43f9a46c73aad46caee3f90ce605fb3c

Authored by kevin_fourie
1 parent eae87e8f

Merged in from DEV trunk...

KTS-3337
"Text extractors using incorrect Python binary because of config.ini option"
Fixed. The stack is now checked before the config.ini option.

Committed by: Megan Watson
Reviewed by: Conrad Vermeulen


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/branches/3.5.2c-Release-Branch@8435 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 7 additions and 6 deletions
lib/util/ktutil.inc
@@ -726,6 +726,13 @@ class KTUtil { @@ -726,6 +726,13 @@ class KTUtil {
726 726
727 // {{{ findCommand 727 // {{{ findCommand
728 function findCommand($sConfigVar, $sDefault = null) { 728 function findCommand($sConfigVar, $sDefault = null) {
  729 + // Check for the stack command before using the user defined command
  730 + $result = KTUtil::checkForStackCommand($sConfigVar);
  731 + if (!empty($result))
  732 + {
  733 + return $result;
  734 + }
  735 +
729 $oKTConfig =& KTConfig::getSingleton(); 736 $oKTConfig =& KTConfig::getSingleton();
730 $sCommand = $oKTConfig->get($sConfigVar, $sDefault); 737 $sCommand = $oKTConfig->get($sConfigVar, $sDefault);
731 if (empty($sCommand)) { 738 if (empty($sCommand)) {
@@ -738,12 +745,6 @@ class KTUtil { @@ -738,12 +745,6 @@ class KTUtil {
738 return $sCommand . ".exe"; 745 return $sCommand . ".exe";
739 } 746 }
740 747
741 - $result = KTUtil::checkForStackCommand($sConfigVar);  
742 - if (!empty($result))  
743 - {  
744 - return $result;  
745 - }  
746 -  
747 $sExecSearchPath = $oKTConfig->get("KnowledgeTree/execSearchPath"); 748 $sExecSearchPath = $oKTConfig->get("KnowledgeTree/execSearchPath");
748 $sExecSearchPath .= PATH_SEPARATOR . KT_DIR . "/../common/"; 749 $sExecSearchPath .= PATH_SEPARATOR . KT_DIR . "/../common/";
749 $sExecSearchPath .= PATH_SEPARATOR . KT_DIR . "/../bin/xpdf/"; 750 $sExecSearchPath .= PATH_SEPARATOR . KT_DIR . "/../bin/xpdf/";