diff --git a/lib/util/ktutil.inc b/lib/util/ktutil.inc index c716cf8..0ec56db 100644 --- a/lib/util/ktutil.inc +++ b/lib/util/ktutil.inc @@ -726,6 +726,13 @@ class KTUtil { // {{{ findCommand function findCommand($sConfigVar, $sDefault = null) { + // Check for the stack command before using the user defined command + $result = KTUtil::checkForStackCommand($sConfigVar); + if (!empty($result)) + { + return $result; + } + $oKTConfig =& KTConfig::getSingleton(); $sCommand = $oKTConfig->get($sConfigVar, $sDefault); if (empty($sCommand)) { @@ -738,12 +745,6 @@ class KTUtil { return $sCommand . ".exe"; } - $result = KTUtil::checkForStackCommand($sConfigVar); - if (!empty($result)) - { - return $result; - } - $sExecSearchPath = $oKTConfig->get("KnowledgeTree/execSearchPath"); $sExecSearchPath .= PATH_SEPARATOR . KT_DIR . "/../common/"; $sExecSearchPath .= PATH_SEPARATOR . KT_DIR . "/../bin/xpdf/";