Commit c45aac155fd682f9253e9e352a482facedde7add

Authored by Megan Watson
1 parent dc4c0df1

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/trunk@8434 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 16 additions and 15 deletions
lib/util/ktutil.inc
@@ -8,31 +8,31 @@ @@ -8,31 +8,31 @@
8 * Document Management Made Simple 8 * Document Management Made Simple
9 * Copyright (C) 2008 KnowledgeTree Inc. 9 * Copyright (C) 2008 KnowledgeTree Inc.
10 * Portions copyright The Jam Warehouse Software (Pty) Limited 10 * Portions copyright The Jam Warehouse Software (Pty) Limited
11 - * 11 + *
12 * This program is free software; you can redistribute it and/or modify it under 12 * This program is free software; you can redistribute it and/or modify it under
13 * the terms of the GNU General Public License version 3 as published by the 13 * the terms of the GNU General Public License version 3 as published by the
14 * Free Software Foundation. 14 * Free Software Foundation.
15 - * 15 + *
16 * This program is distributed in the hope that it will be useful, but WITHOUT 16 * This program is distributed in the hope that it will be useful, but WITHOUT
17 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 17 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 18 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
19 * details. 19 * details.
20 - * 20 + *
21 * You should have received a copy of the GNU General Public License 21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see <http://www.gnu.org/licenses/>. 22 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23 - *  
24 - * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco, 23 + *
  24 + * You can contact KnowledgeTree Inc., PO Box 7775 #87847, San Francisco,
25 * California 94120-7775, or email info@knowledgetree.com. 25 * California 94120-7775, or email info@knowledgetree.com.
26 - * 26 + *
27 * The interactive user interfaces in modified source and object code versions 27 * The interactive user interfaces in modified source and object code versions
28 * of this program must display Appropriate Legal Notices, as required under 28 * of this program must display Appropriate Legal Notices, as required under
29 * Section 5 of the GNU General Public License version 3. 29 * Section 5 of the GNU General Public License version 3.
30 - * 30 + *
31 * In accordance with Section 7(b) of the GNU General Public License version 3, 31 * In accordance with Section 7(b) of the GNU General Public License version 3,
32 * these Appropriate Legal Notices must retain the display of the "Powered by 32 * these Appropriate Legal Notices must retain the display of the "Powered by
33 - * KnowledgeTree" logo and retain the original copyright notice. If the display of the 33 + * KnowledgeTree" logo and retain the original copyright notice. If the display of the
34 * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices 34 * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices
35 - * must display the words "Powered by KnowledgeTree" and retain the original 35 + * must display the words "Powered by KnowledgeTree" and retain the original
36 * copyright notice. 36 * copyright notice.
37 * Contributor( s): ______________________________________ 37 * Contributor( s): ______________________________________
38 */ 38 */
@@ -727,6 +727,13 @@ class KTUtil { @@ -727,6 +727,13 @@ class KTUtil {
727 727
728 // {{{ findCommand 728 // {{{ findCommand
729 function findCommand($sConfigVar, $sDefault = null) { 729 function findCommand($sConfigVar, $sDefault = null) {
  730 + // Check for the stack command before using the user defined command
  731 + $result = KTUtil::checkForStackCommand($sConfigVar);
  732 + if (!empty($result))
  733 + {
  734 + return $result;
  735 + }
  736 +
730 $oKTConfig =& KTConfig::getSingleton(); 737 $oKTConfig =& KTConfig::getSingleton();
731 $sCommand = $oKTConfig->get($sConfigVar, $sDefault); 738 $sCommand = $oKTConfig->get($sConfigVar, $sDefault);
732 if (empty($sCommand)) { 739 if (empty($sCommand)) {
@@ -739,12 +746,6 @@ class KTUtil { @@ -739,12 +746,6 @@ class KTUtil {
739 return $sCommand . ".exe"; 746 return $sCommand . ".exe";
740 } 747 }
741 748
742 - $result = KTUtil::checkForStackCommand($sConfigVar);  
743 - if (!empty($result))  
744 - {  
745 - return $result;  
746 - }  
747 -  
748 $sExecSearchPath = $oKTConfig->get("KnowledgeTree/execSearchPath"); 749 $sExecSearchPath = $oKTConfig->get("KnowledgeTree/execSearchPath");
749 $sExecSearchPath .= PATH_SEPARATOR . KT_DIR . "/../common/"; 750 $sExecSearchPath .= PATH_SEPARATOR . KT_DIR . "/../common/";
750 $sExecSearchPath .= PATH_SEPARATOR . KT_DIR . "/../bin/xpdf/"; 751 $sExecSearchPath .= PATH_SEPARATOR . KT_DIR . "/../bin/xpdf/";