Commit 4b85344a2c2a8af413fc009730b5b2d52a05380e
1 parent
96c50621
Merged in from DEV trunk...
KTS-2859 "Unable to upload files in Windows XP and Windows 2003 - seemingly an MS Word issue only." Fixed. Add "call " in front of the command passed to exec(). Committed by: Megan Watson Reviewed By: Conrad Vermeulen git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/branches/3.4.6-Release-Branch@7932 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
3 changed files
with
5 additions
and
29 deletions
lib/util/ktutil.inc
| ... | ... | @@ -206,11 +206,9 @@ class KTUtil { |
| 206 | 206 | $aOutput = array(); |
| 207 | 207 | $iRet = ''; |
| 208 | 208 | |
| 209 | - if (OS_WINDOWS){ | |
| 210 | - $wait = false; | |
| 211 | - if(isset($aOptions['exec_wait']) && ($aOptions['exec_wait'] == 'true')){ | |
| 212 | - $wait = true; | |
| 213 | - } | |
| 209 | + if(OS_WINDOWS){ | |
| 210 | + $sCmd = 'call '.$sCmd; | |
| 211 | + } | |
| 214 | 212 | |
| 215 | 213 | $WshShell = new COM("WScript.Shell"); |
| 216 | 214 | $res = $WshShell->Run($sCmd, 0, $wait); | ... | ... |
plugins/ktstandard/contents/BaseIndexer.php
| ... | ... | @@ -148,11 +148,8 @@ class KTBaseIndexerTrigger { |
| 148 | 148 | $cmdline[] = $sTempFilename; |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | - if(OS_WINDOWS){ | |
| 152 | - $aRet = KTUtil::winexec($cmdline, $aOptions); | |
| 153 | - }else{ | |
| 154 | - $aRet = KTUtil::pexec($cmdline, $aOptions); | |
| 155 | - } | |
| 151 | + $aRet = KTUtil::pexec($cmdline, $aOptions); | |
| 152 | + | |
| 156 | 153 | $this->aCommandOutput = $aRet['out']; |
| 157 | 154 | $contents = file_get_contents($sTempFilename); |
| 158 | 155 | ... | ... |
plugins/ktstandard/contents/WordIndexer.php
| ... | ... | @@ -56,25 +56,6 @@ class KTWordIndexerTrigger extends KTBaseIndexerTrigger { |
| 56 | 56 | if (OS_WINDOWS) { |
| 57 | 57 | $sDir = dirname(dirname($sCommand)); |
| 58 | 58 | putenv('HOME=' . $sDir); |
| 59 | - | |
| 60 | - /* | |
| 61 | - $cmdline = array($sCommand); | |
| 62 | - $cmdline = kt_array_merge($cmdline, $this->args); | |
| 63 | - $cmdline[] = $sFilename; | |
| 64 | - | |
| 65 | - $sCmd = KTUtil::safeShellString($cmdline); | |
| 66 | - $sCmd .= " >> " . escapeshellarg($sTempFilename); | |
| 67 | - | |
| 68 | - $sCmd = str_replace( '/','\\',$sCmd); | |
| 69 | - | |
| 70 | - $sCmd = "start /b \"kt\" " . $sCmd; | |
| 71 | - | |
| 72 | - pclose(popen($sCmd, 'r')); | |
| 73 | - | |
| 74 | - $this->aCommandOutput = 1; | |
| 75 | - $contents = file_get_contents($sTempFilename); | |
| 76 | - return $contents; | |
| 77 | - */ | |
| 78 | 59 | } |
| 79 | 60 | return parent::extract_contents($sFilename, $sTempFilename); |
| 80 | 61 | } | ... | ... |