diff --git a/lib/util/ktutil.inc b/lib/util/ktutil.inc index 8e8b4dc..070742a 100644 --- a/lib/util/ktutil.inc +++ b/lib/util/ktutil.inc @@ -206,11 +206,9 @@ class KTUtil { $aOutput = array(); $iRet = ''; - if (OS_WINDOWS){ - $wait = false; - if(isset($aOptions['exec_wait']) && ($aOptions['exec_wait'] == 'true')){ - $wait = true; - } + if(OS_WINDOWS){ + $sCmd = 'call '.$sCmd; + } $WshShell = new COM("WScript.Shell"); $res = $WshShell->Run($sCmd, 0, $wait); diff --git a/plugins/ktstandard/contents/BaseIndexer.php b/plugins/ktstandard/contents/BaseIndexer.php index 764d387..93243e0 100644 --- a/plugins/ktstandard/contents/BaseIndexer.php +++ b/plugins/ktstandard/contents/BaseIndexer.php @@ -148,11 +148,8 @@ class KTBaseIndexerTrigger { $cmdline[] = $sTempFilename; } - if(OS_WINDOWS){ - $aRet = KTUtil::winexec($cmdline, $aOptions); - }else{ - $aRet = KTUtil::pexec($cmdline, $aOptions); - } + $aRet = KTUtil::pexec($cmdline, $aOptions); + $this->aCommandOutput = $aRet['out']; $contents = file_get_contents($sTempFilename); diff --git a/plugins/ktstandard/contents/WordIndexer.php b/plugins/ktstandard/contents/WordIndexer.php index 7d6343b..15e0214 100644 --- a/plugins/ktstandard/contents/WordIndexer.php +++ b/plugins/ktstandard/contents/WordIndexer.php @@ -56,25 +56,6 @@ class KTWordIndexerTrigger extends KTBaseIndexerTrigger { if (OS_WINDOWS) { $sDir = dirname(dirname($sCommand)); putenv('HOME=' . $sDir); - - /* - $cmdline = array($sCommand); - $cmdline = kt_array_merge($cmdline, $this->args); - $cmdline[] = $sFilename; - - $sCmd = KTUtil::safeShellString($cmdline); - $sCmd .= " >> " . escapeshellarg($sTempFilename); - - $sCmd = str_replace( '/','\\',$sCmd); - - $sCmd = "start /b \"kt\" " . $sCmd; - - pclose(popen($sCmd, 'r')); - - $this->aCommandOutput = 1; - $contents = file_get_contents($sTempFilename); - return $contents; - */ } return parent::extract_contents($sFilename, $sTempFilename); }