From 64f46e6f5f570165d20db4b9fdf564c8d096923d Mon Sep 17 00:00:00 2001 From: Simon Schaufelberger Date: Mon, 26 Oct 2015 15:03:56 +0100 Subject: [PATCH] [BUGFIX] wrong variable name, fix command for windows --- Classes/Utility/Shell.php | 9 ++++++--- Classes/Utility/Tca.php | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Classes/Utility/Shell.php b/Classes/Utility/Shell.php index 36a497f..b6c1d70 100644 --- a/Classes/Utility/Shell.php +++ b/Classes/Utility/Shell.php @@ -106,7 +106,7 @@ static function findCmd($cmd) { '/usr/local/bin/', '/bin/', '/Applications/xampp/xamppfiles/bin/' - ); + ); $binFolders = array_merge($binFolders, t3lib_div::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['SYS']['binPath'])); $extensions = array(''); @@ -116,11 +116,14 @@ static function findCmd($cmd) { } foreach ($extensions as $extension) { - $cwd = false; reset($binFolders); foreach ($binFolders as $cwd) { $which = t3lib_div::makeInstance('Tx_Contentstage_Utility_Shell'); - $which->exec('which ' . $cwd . $cmd . $extension, ''); + if (TYPO3_OS == 'WIN') { + $which->exec('WHERE ' . (($cwd === '') ? $cwd : $cwd . ':') . $cmd . $extension, ''); + } else { + $which->exec('which ' . $cwd . $cmd . $extension, ''); + } $stdout = $which->getStdout(); if (strlen($stdout) > 0) { return trim($stdout); diff --git a/Classes/Utility/Tca.php b/Classes/Utility/Tca.php index 2730849..1f29ce4 100644 --- a/Classes/Utility/Tca.php +++ b/Classes/Utility/Tca.php @@ -558,7 +558,7 @@ public function isVisibleField($table, $field) { return false; } - return !isset($this->ignoreFields[$_table][$field]) || empty($this->ignoreFields[$_table][$field]); + return !isset($this->ignoreFields[$table][$field]) || empty($this->ignoreFields[$table][$field]); } /**