Fixed bug #16800: Exec-wrapper
authorSteffen Kamper <info@sk-typo3.de>
Fri, 24 Dec 2010 14:32:33 +0000 (14:32 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Fri, 24 Dec 2010 14:32:33 +0000 (14:32 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9891 709f56b5-9817-0410-a4d7-c38de5d9e867

16 files changed:
ChangeLog
t3lib/class.t3lib_diff.php
t3lib/class.t3lib_div.php
t3lib/class.t3lib_exec.php
t3lib/class.t3lib_extfilefunc.php
t3lib/class.t3lib_stdgraphic.php
t3lib/core_autoload.php
t3lib/thumbs.php
t3lib/utility/class.t3lib_utility_command.php [new file with mode: 0644]
typo3/show_item.php
typo3/sysext/em/classes/tools/class.tx_em_tools.php
typo3/sysext/indexed_search/class.external_parser.php
typo3/sysext/install/mod/class.tx_install.php
typo3/sysext/rsaauth/sv1/backends/class.tx_rsaauth_cmdline_backend.php
typo3/sysext/tsconfig_help/mod1/index.php
typo3/sysext/workspaces/ext_tables.php

index 7a760b9..0db31cf 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2010-12-24  Steffen Kamper  <steffen@typo3.org>
 
+       * Fixed bug #16800: Exec-wrapper
        * Fixed bug #16770: Make recycler stateful
 
 2010-12-23  Steffen Kamper  <steffen@typo3.org>
index 482a243..51fea4f 100644 (file)
@@ -165,7 +165,7 @@ class t3lib_diff {
                        // Perform diff.
                $cmd = $GLOBALS['TYPO3_CONF_VARS']['BE']['diff_path'] . ' ' . $this->diffOptions . ' ' . $file1 . ' ' . $file2;
                $res = array();
-               exec($cmd, $res);
+               t3lib_utility_Command::exec($cmd, $res);
 
                unlink($file1);
                unlink($file2);
index 1401e66..2e45f1e 100644 (file)
@@ -489,7 +489,7 @@ final class t3lib_div {
                if ($gfxConf['gif_compress'] && strtolower(substr($theFile, -4, 4)) == '.gif') { // GIF...
                        if (($type == 'IM' || !$type) && $gfxConf['im'] && $gfxConf['im_path_lzw']) { // IM
                                $cmd = self::imageMagickCommand('convert', '"' . $theFile . '" "' . $theFile . '"', $gfxConf['im_path_lzw']);
-                               exec($cmd);
+                               t3lib_utility_Command::exec($cmd);
                                $returnCode = 'IM';
                                if (@is_file($theFile)) {
                                        self::fixPermissions($theFile);
@@ -523,7 +523,7 @@ final class t3lib_div {
                                && @is_file($theFile)) { // IM
                        $newFile = substr($theFile, 0, -4) . '.gif';
                        $cmd = self::imageMagickCommand('convert', '"' . $theFile . '" "' . $newFile . '"', $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path_lzw']);
-                       exec($cmd);
+                       t3lib_utility_Command::exec($cmd);
                        $theFile = $newFile;
                        if (@is_file($newFile)) {
                                self::fixPermissions($newFile);
@@ -553,7 +553,7 @@ final class t3lib_div {
                        } else {
                                $newFile = PATH_site . 'typo3temp/readPG_' . md5($theFile . '|' . filemtime($theFile)) . ($output_png ? '.png' : '.gif');
                                $cmd = self::imageMagickCommand('convert', '"' . $theFile . '" "' . $newFile . '"', $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path']);
-                               exec($cmd);
+                               t3lib_utility_Command::exec($cmd);
                                if (@is_file($newFile)) {
                                        self::fixPermissions($newFile);
                                        return $newFile;
@@ -6183,60 +6183,7 @@ final class t3lib_div {
         * @return      string          Compiled command that deals with IM6 & GraphicsMagick
         */
        public static function imageMagickCommand($command, $parameters, $path = '') {
-               $gfxConf = $GLOBALS['TYPO3_CONF_VARS']['GFX'];
-               $isExt = (TYPO3_OS == 'WIN' ? '.exe' : '');
-               $switchCompositeParameters = FALSE;
-
-               if (!$path) {
-                       $path = $gfxConf['im_path'];
-               }
-               $path = self::fixWindowsFilePath($path);
-
-               $im_version = strtolower($gfxConf['im_version_5']);
-               $combineScript = $gfxConf['im_combine_filename'] ? trim($gfxConf['im_combine_filename']) : 'combine';
-
-               if ($command === 'combine') { // This is only used internally, has no effect outside
-                       $command = 'composite';
-               }
-
-                       // Compile the path & command
-               if ($im_version === 'gm') {
-                       $switchCompositeParameters = TRUE;
-                       $path = escapeshellarg($path . 'gm' . $isExt) . ' ' . $command;
-               } else {
-                       if ($im_version === 'im6') {
-                               $switchCompositeParameters = TRUE;
-                       }
-                       $path = escapeshellarg($path . (($command == 'composite') ? $combineScript : $command) . $isExt);
-               }
-
-                       // strip profile information for thumbnails and reduce their size
-               if ($parameters && $command != 'identify' && $gfxConf['im_useStripProfileByDefault'] && $gfxConf['im_stripProfileCommand'] != '') {
-                       if (strpos($parameters, $gfxConf['im_stripProfileCommand']) === FALSE) {
-                                       // Determine whether the strip profile action has be disabled by TypoScript:
-                               if ($parameters !== '-version' && strpos($parameters, '###SkipStripProfile###') === FALSE) {
-                                       $parameters = $gfxConf['im_stripProfileCommand'] . ' ' . $parameters;
-                               } else {
-                                       $parameters = str_replace('###SkipStripProfile###', '', $parameters);
-                               }
-                       }
-               }
-
-               $cmdLine = $path . ' ' . $parameters;
-
-               if ($command == 'composite' && $switchCompositeParameters) { // Because of some weird incompatibilities between ImageMagick 4 and 6 (plus GraphicsMagick), it is needed to change the parameters order under some preconditions
-                       $paramsArr = self::unQuoteFilenames($parameters);
-
-                       if (count($paramsArr) > 5) { // The mask image has been specified => swap the parameters
-                               $tmp = $paramsArr[count($paramsArr) - 3];
-                               $paramsArr[count($paramsArr) - 3] = $paramsArr[count($paramsArr) - 4];
-                               $paramsArr[count($paramsArr) - 4] = $tmp;
-                       }
-
-                       $cmdLine = $path . ' ' . implode(' ', $paramsArr);
-               }
-
-               return $cmdLine;
+               return t3lib_utility_Command::imageMagickCommand($command, $parameters, $path);
        }
 
        /**
index 347c292..2730556 100644 (file)
@@ -160,7 +160,7 @@ class t3lib_exec {
                        // Try to get the executable with the command 'which'.
                        // It does the same like already done, but maybe on other paths
                if (TYPO3_OS != 'WIN') {
-                       $cmd = @exec('which ' . $cmd);
+                       $cmd = @t3lib_utility_Command::exec('which ' . $cmd);
                        if (@is_executable($cmd)) {
                                self::$applications[$cmd]['app'] = $cmd;
                                self::$applications[$cmd]['path'] = dirname($cmd) . '/';
index 171a2ab..3d8eba5 100644 (file)
@@ -502,7 +502,7 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions {
                                                                        copy($theFile, $theDestFile);
                                                                } else {
                                                                        $cmd = 'cp "' . $theFile . '" "' . $theDestFile . '"';
-                                                                       exec($cmd);
+                                                                       t3lib_utility_Command::exec($cmd);
                                                                }
                                                                t3lib_div::fixPermissions($theDestFile);
                                                                clearstatcache();
@@ -546,7 +546,7 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions {
                                                                if ($this->checkPathAgainstMounts($theDestFile) && $this->checkPathAgainstMounts($theFile)) {
                                                                        // No way to do this under windows!
                                                                        $cmd = 'cp -R "' . $theFile . '" "' . $theDestFile . '"';
-                                                                       exec($cmd);
+                                                                       t3lib_utility_Command::exec($cmd);
                                                                        clearstatcache();
                                                                        if (@is_dir($theDestFile)) {
                                                                                $this->writelog(2, 0, 2, 'Directory "%s" copied to "%s"', Array($theFile, $theDestFile));
@@ -621,7 +621,7 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions {
                                                                        @rename($theFile, $theDestFile);
                                                                } else {
                                                                        $cmd = 'mv "' . $theFile . '" "' . $theDestFile . '"';
-                                                                       exec($cmd);
+                                                                       t3lib_utility_Command::exec($cmd);
                                                                }
                                                                clearstatcache();
                                                                if (@is_file($theDestFile)) {
@@ -667,8 +667,7 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions {
                                                                        } else {
                                                                                $cmd = 'mv "' . $theFile . '" "' . $theDestFile . '"';
                                                                                $errArr = array();
-                                                                               $retVar = 0;
-                                                                               exec($cmd, $errArr, $retVar);
+                                                                               t3lib_utility_Command::exec($cmd, $errArr);
                                                                        }
                                                                        clearstatcache();
                                                                        if (@is_dir($theDestFile)) {
@@ -997,7 +996,7 @@ class t3lib_extFileFunctions extends t3lib_basicFileFunctions {
                                                        if ($this->checkPathAgainstMounts($theFile) && $this->checkPathAgainstMounts($theDest . '/')) {
                                                                // No way to do this under windows.
                                                                $cmd = $this->unzipPath . 'unzip -qq "' . $theFile . '" -d "' . $theDest . '"';
-                                                               exec($cmd);
+                                                               t3lib_utility_Command::exec($cmd);
                                                                $this->writelog(7, 0, 1, 'Unzipping file "%s" in "%s"', Array($theFile, $theDest));
                                                                return TRUE;
                                                        } else {
index 4e57dd1..6a214ef 100644 (file)
@@ -2587,7 +2587,7 @@ class t3lib_stdGraphic {
                        $frame = $this->noFramePrepended ? '' : '[0]';
                        $cmd = t3lib_div::imageMagickCommand('identify', $this->wrapFileName($imagefile) . $frame);
                        $returnVal = array();
-                       exec($cmd, $returnVal);
+                       t3lib_utility_Command::exec($cmd, $returnVal);
                        $splitstring = $returnVal[0];
                        $this->IM_commands[] = array('identify', $cmd, $returnVal[0]);
                        if ($splitstring) {
@@ -2635,7 +2635,7 @@ class t3lib_stdGraphic {
                        $cmd = t3lib_div::imageMagickCommand('convert', $params . ' ' . $this->wrapFileName($input) . $frame . ' ' . $this->wrapFileName($output));
                        $this->IM_commands[] = array($output, $cmd);
 
-                       $ret = exec($cmd);
+                       $ret = t3lib_utility_Command::exec($cmd);
                        t3lib_div::fixPermissions($output); // Change the permissions of the file
 
                        return $ret;
@@ -2666,7 +2666,7 @@ class t3lib_stdGraphic {
                        $cmd = t3lib_div::imageMagickCommand('combine', '-compose over +matte ' . $this->wrapFileName($input) . ' ' . $this->wrapFileName($overlay) . ' ' . $this->wrapFileName($theMask) . ' ' . $this->wrapFileName($output)); // +matte = no alpha layer in output
                        $this->IM_commands[] = array($output, $cmd);
 
-                       $ret = exec($cmd);
+                       $ret = t3lib_utility_Command::exec($cmd);
                        t3lib_div::fixPermissions($output); // Change the permissions of the file
 
                        if (is_file($theMask)) {
index 331fcaa..5f5e216 100644 (file)
@@ -145,6 +145,7 @@ $t3libClasses = array(
        't3lib_pdohelper' => PATH_t3lib . 'class.t3lib_pdohelper.php',
        't3lib_tceforms_suggest' => PATH_t3lib . 'tceforms/class.t3lib_tceforms_suggest.php',
        't3lib_tceforms_suggest_defaultreceiver' => PATH_t3lib . 'tceforms/class.t3lib_tceforms_suggest_defaultreceiver.php',
+       't3lib_utility_command' => PATH_t3lib . 'utility/class.t3lib_utility_command.php',
        't3lib_utility_client' => PATH_t3lib . 'utility/class.t3lib_utility_client.php',
        't3lib_utility_dependency' => PATH_t3lib . 'utility/class.t3lib_utility_dependency.php',
        't3lib_utility_dependency_callback' => PATH_t3lib . 'utility/dependency/class.t3lib_utility_dependency_callback.php',
index 852d08a..87b6b89 100644 (file)
@@ -240,7 +240,7 @@ class SC_t3lib_thumbs {
                                if (!file_exists($this->output))        {
                                        $parameters = '-sample ' . $this->size . ' ' . $this->wrapFileName($this->input) . '[0] ' . $this->wrapFileName($this->output);
                                        $cmd = t3lib_div::imageMagickCommand('convert', $parameters);
-                                       exec($cmd);
+                                       t3lib_utility_Command::exec($cmd);
                                        if (!file_exists($this->output))        {
                                                $this->errorGif('No thumb','generated!',basename($this->input));
                                        } else {
diff --git a/t3lib/utility/class.t3lib_utility_command.php b/t3lib/utility/class.t3lib_utility_command.php
new file mode 100644 (file)
index 0000000..877c860
--- /dev/null
@@ -0,0 +1,120 @@
+<?php
+/***************************************************************
+ * Copyright notice
+ *
+ * (c) 2010 Steffen Kamper <steffen@typo3.org>
+ * All rights reserved
+ *
+ * This script is part of the TYPO3 project. The TYPO3 project is
+ * free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * The GNU General Public License can be found at
+ * http://www.gnu.org/copyleft/gpl.html.
+ * A copy is found in the textfile GPL.txt and important notices to the license
+ * from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ * This script is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Class to handle system commands.
+ *
+ * $Id: class.t3lib_utility_command.php $
+ *
+ * @author     Steffen Kamper <steffen@typo3.org>
+ */
+final class t3lib_utility_Command {
+
+
+       /**
+        * Wrapper function for php exec function
+        * Needs to be central to have better control and possible fix for safe_mode/low php version restrictions as occurred with IM/GM issues
+        *
+        * @static
+        * @param  string  $command
+        * @param  null|array $output
+        * @param  integer $returnValue
+        * @return null|array
+        */
+       public static function exec($command, &$output = NULL, &$returnValue = 0) {
+               $lastLine = exec($command, $output, $returnValue);
+               return $lastLine;
+       }
+
+       /**
+        * Compile the command for running ImageMagick/GraphicsMagick.
+        *
+        * @param       string          Command to be run: identify, convert or combine/composite
+        * @param       string          The parameters string
+        * @param       string          Override the default path (e.g. used by the install tool)
+        * @return      string          Compiled command that deals with IM6 & GraphicsMagick
+        */
+       public static function imageMagickCommand($command, $parameters, $path = '') {
+               $gfxConf = $GLOBALS['TYPO3_CONF_VARS']['GFX'];
+               $isExt = (TYPO3_OS == 'WIN' ? '.exe' : '');
+               $switchCompositeParameters = FALSE;
+
+               if (!$path) {
+                       $path = $gfxConf['im_path'];
+               }
+               $path = t3lib_div::fixWindowsFilePath($path);
+
+               $im_version = strtolower($gfxConf['im_version_5']);
+               $combineScript = $gfxConf['im_combine_filename'] ? trim($gfxConf['im_combine_filename']) : 'combine';
+
+               if ($command === 'combine') { // This is only used internally, has no effect outside
+                       $command = 'composite';
+               }
+
+                       // Compile the path & command
+               if ($im_version === 'gm') {
+                       $switchCompositeParameters = TRUE;
+                       $path = escapeshellarg($path . 'gm' . $isExt) . ' ' . $command;
+               } else {
+                       if ($im_version === 'im6') {
+                               $switchCompositeParameters = TRUE;
+                       }
+                       $path = escapeshellarg($path . (($command == 'composite') ? $combineScript : $command) . $isExt);
+               }
+
+                       // strip profile information for thumbnails and reduce their size
+               if ($parameters && $command != 'identify' && $gfxConf['im_useStripProfileByDefault'] && $gfxConf['im_stripProfileCommand'] != '') {
+                       if (strpos($parameters, $gfxConf['im_stripProfileCommand']) === FALSE) {
+                                       // Determine whether the strip profile action has be disabled by TypoScript:
+                               if ($parameters !== '-version' && strpos($parameters, '###SkipStripProfile###') === FALSE) {
+                                       $parameters = $gfxConf['im_stripProfileCommand'] . ' ' . $parameters;
+                               } else {
+                                       $parameters = str_replace('###SkipStripProfile###', '', $parameters);
+                               }
+                       }
+               }
+
+               $cmdLine = $path . ' ' . $parameters;
+
+               if ($command == 'composite' && $switchCompositeParameters) { // Because of some weird incompatibilities between ImageMagick 4 and 6 (plus GraphicsMagick), it is needed to change the parameters order under some preconditions
+                       $paramsArr = t3lib_div::unQuoteFilenames($parameters);
+
+                       if (count($paramsArr) > 5) { // The mask image has been specified => swap the parameters
+                               $tmp = $paramsArr[count($paramsArr) - 3];
+                               $paramsArr[count($paramsArr) - 3] = $paramsArr[count($paramsArr) - 4];
+                               $paramsArr[count($paramsArr) - 4] = $tmp;
+                       }
+
+                       $cmdLine = $path . ' ' . implode(' ', $paramsArr);
+               }
+
+               return $cmdLine;
+       }
+
+}
+
+?>
\ No newline at end of file
index c8b4822..92714ff 100644 (file)
@@ -371,7 +371,7 @@ class SC_show_item {
                                if ($ext=='zip')        {
                                        $code = '';
                                        $t = array();
-                                       exec('unzip -l '.$this->file, $t);
+                                       t3lib_utility_Command::exec('unzip -l ' . $this->file, $t);
                                        if (is_array($t))       {
                                                reset($t);
                                                next($t);
@@ -396,7 +396,7 @@ class SC_show_item {
                                                $compr = 'z';
                                        }
                                        $t = array();
-                                       exec('tar t'.$compr.'f '.$this->file, $t);
+                                       t3lib_utility_Command::exec('tar t' . $compr . 'f ' . $this->file, $t);
                                        if (is_array($t))       {
                                                foreach($t as $val)     {
                                                        $code.='
index b8bfa53..8c30af1 100644 (file)
@@ -108,7 +108,7 @@ final class tx_em_Tools {
                if (strlen($GLOBALS['TYPO3_CONF_VARS']['BE']['unzip_path'])) {
                        chdir($path);
                        $cmd = $GLOBALS['TYPO3_CONF_VARS']['BE']['unzip_path'] . ' -o ' . escapeshellarg($file);
-                       exec($cmd, $list, $ret);
+                       t3lib_utility_Command::exec($cmd, $list, $ret);
                        return ($ret === 0);
                } else {
                                // we use a pure PHP unzip
index 7614750..e38d0e8 100755 (executable)
@@ -412,7 +412,7 @@ class tx_indexed_search_extparse {
                                if ($this->app['pdfinfo'])      {
                                                // Getting pdf-info:
                                        $cmd = $this->app['pdfinfo'] . ' ' . escapeshellarg($absFile);
-                                       exec($cmd,$res);
+                                       t3lib_utility_Command::exec($cmd, $res);
                                        $pdfInfo = $this->splitPdfInfo($res);
                                        unset($res);
                                        if (intval($pdfInfo['pages']))  {
@@ -422,7 +422,7 @@ class tx_indexed_search_extparse {
                                                $tempFileName = t3lib_div::tempnam('Typo3_indexer');            // Create temporary name
                                                @unlink ($tempFileName);        // Delete if exists, just to be safe.
                                                $cmd = $this->app['pdftotext'] . ' -f ' . $low . ' -l ' . $high . ' -enc UTF-8 -q ' . escapeshellarg($absFile) . ' ' . $tempFileName;
-                                               exec($cmd);
+                                               t3lib_utility_Command::exec($cmd);
                                                if (@is_file($tempFileName))    {
                                                        $content = t3lib_div::getUrl($tempFileName);
                                                        unlink($tempFileName);
@@ -438,7 +438,7 @@ class tx_indexed_search_extparse {
                        case 'doc':
                                if ($this->app['catdoc'])       {
                                        $cmd = $this->app['catdoc'] . ' -d utf-8 ' . escapeshellarg($absFile);
-                                       exec($cmd,$res);
+                                       t3lib_utility_Command::exec($cmd, $res);
                                        $content = implode(LF,$res);
                                        unset($res);
                                        $contentArr = $this->pObj->splitRegularContent($this->removeEndJunk($content));
@@ -448,7 +448,7 @@ class tx_indexed_search_extparse {
                        case 'ppt':
                                if ($this->app['ppthtml'])      {
                                        $cmd = $this->app['ppthtml'] . ' ' . escapeshellarg($absFile);
-                                       exec($cmd,$res);
+                                       t3lib_utility_Command::exec($cmd, $res);
                                        $content = implode(LF,$res);
                                        unset($res);
                                        $content = $this->pObj->convertHTMLToUtf8($content);
@@ -459,7 +459,7 @@ class tx_indexed_search_extparse {
                        case 'xls':
                                if ($this->app['xlhtml'])       {
                                        $cmd = $this->app['xlhtml'] . ' -nc -te ' . escapeshellarg($absFile);
-                                       exec($cmd,$res);
+                                       t3lib_utility_Command::exec($cmd, $res);
                                        $content = implode(LF,$res);
                                        unset($res);
                                        $content = $this->pObj->convertHTMLToUtf8($content);
@@ -476,13 +476,13 @@ class tx_indexed_search_extparse {
                                if ($this->app['unzip'])        {
                                                // Read content.xml:
                                        $cmd = $this->app['unzip'] . ' -p ' . escapeshellarg($absFile) . ' content.xml';
-                                       exec($cmd,$res);
+                                       t3lib_utility_Command::exec($cmd, $res);
                                        $content_xml = implode(LF,$res);
                                        unset($res);
 
                                                // Read meta.xml:
                                        $cmd = $this->app['unzip'] . ' -p ' . escapeshellarg($absFile) . ' meta.xml';
-                                       exec($cmd, $res);
+                                       t3lib_utility_Command::exec($cmd, $res);
                                        $meta_xml = implode(LF,$res);
                                        unset($res);
 
@@ -509,7 +509,7 @@ class tx_indexed_search_extparse {
                        case 'rtf':
                                if ($this->app['unrtf'])        {
                                        $cmd = $this->app['unrtf'] . ' ' . escapeshellarg($absFile);
-                                       exec($cmd,$res);
+                                       t3lib_utility_Command::exec($cmd, $res);
                                        $fileContent = implode(LF,$res);
                                        unset($res);
                                        $fileContent = $this->pObj->convertHTMLToUtf8($fileContent);
@@ -585,7 +585,7 @@ class tx_indexed_search_extparse {
                        case 'pdf':
                                        // Getting pdf-info:
                                $cmd = $this->app['pdfinfo'] . ' ' . escapeshellarg($absFile);
-                               exec($cmd,$res);
+                               t3lib_utility_Command::exec($cmd, $res);
                                $pdfInfo = $this->splitPdfInfo($res);
                                unset($res);
 
index 9167d26..6b503fd 100755 (executable)
@@ -3091,7 +3091,7 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                        $src = $this->backPath.'gfx/typo3logo.gif';
                        if (@is_file($src) && !strstr($src,' ') && !strstr($dest,' ')) {
                                $cmd = t3lib_div::imageMagickCommand('convert', $src.' '.$dest, $path);
-                               exec($cmd);
+                               t3lib_utility_Command::exec($cmd);
                        } else die('No typo3/gfx/typo3logo.gif file!');
                        $out='';
                        if (@is_file($dest)) {
@@ -3150,7 +3150,7 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
 
                $cmd = t3lib_div::imageMagickCommand($file, $parameters, $path);
                $retVal = false;
-               exec($cmd, $retVal);
+               t3lib_utility_Command::exec($cmd, $retVal);
                $string = $retVal[0];
                list(,$ver) = explode('Magick', $string);
                list($ver) = explode(' ',trim($ver));
@@ -5694,7 +5694,7 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                                        $results[] = $this->performUpdateQueries($update_statements['create_table'], $this->INSTALL['database_update']);
                                                        $results[] = $this->performUpdateQueries($remove_statements['change_table'], $this->INSTALL['database_update']);
                                                        $results[] = $this->performUpdateQueries($remove_statements['drop_table'], $this->INSTALL['database_update']);
-                                                       
+
                                                        $this->databaseUpdateErrorMessages = array();
                                                        foreach ($results as $resultSet) {
                                                                if (is_array($resultSet)) {
index 815d928..05ed160 100644 (file)
@@ -95,7 +95,7 @@ class tx_rsaauth_cmdline_backend extends tx_rsaauth_abstract_backend {
                // secure.
                $command = $this->opensslPath . ' genrsa -out ' .
                        escapeshellarg($privateKeyFile) . ' 1024';
-               exec($command);
+               t3lib_utility_Command::exec($command);
 
                // Test that we got a private key
                $privateKey = file_get_contents($privateKeyFile);
@@ -103,7 +103,7 @@ class tx_rsaauth_cmdline_backend extends tx_rsaauth_abstract_backend {
                        // Ok, we got the private key. Get the modulus.
                        $command = $this->opensslPath . ' rsa -noout -modulus -in ' .
                                escapeshellarg($privateKeyFile);
-                       $value = exec($command);
+                       $value = t3lib_utility_Command::exec($command);
                        if (substr($value, 0, 8) === 'Modulus=') {
                                $publicKey = substr($value, 8);
 
@@ -144,7 +144,7 @@ class tx_rsaauth_cmdline_backend extends tx_rsaauth_abstract_backend {
 
                // Execute the command and capture the result
                $output = array();
-               exec($command, $output);
+               t3lib_utility_Command::exec($command, $output);
 
                // Remove the file
                @unlink($privateKeyFile);
@@ -164,7 +164,7 @@ class tx_rsaauth_cmdline_backend extends tx_rsaauth_abstract_backend {
                $result = false;
                if ($this->opensslPath) {
                        // If path exists, test that command runs and can produce output
-                       $test = exec($this->opensslPath . ' version');
+                       $test = t3lib_utility_Command::exec($this->opensslPath . ' version');
                        $result = (substr($test, 0, 8) == 'OpenSSL ');
                }
                return $result;
index b72fddf..215f939 100644 (file)
@@ -286,7 +286,7 @@ class tx_tsconfighelp_module1 extends t3lib_SCbase {
                        $output = t3lib_div::getURL($tempPath.$filename);
 
                        $cmd = 'rm -r "'.$tempPath.'"';
-                       exec($cmd);
+                       t3lib_utility_Command::exec($cmd);
 
                        return $output;
                }
index 1ea0a51..1940c78 100644 (file)
@@ -21,6 +21,7 @@ if (TYPO3_MODE == 'BE') {
                        'access' => 'user,group',
                        'icon'   => 'EXT:workspaces/Resources/Public/Images/moduleicon.gif',
                        'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_mod.xml',
+                       'navigationComponentId' => 'typo3-pagetree',
                )
        );