diff options
author | Morris Jobke <morris.jobke@gmail.com> | 2013-10-17 06:21:04 -0700 |
---|---|---|
committer | Morris Jobke <morris.jobke@gmail.com> | 2013-10-17 06:21:04 -0700 |
commit | e0af42d12467fd7b7abe63adf7eebca14ff1d8f5 (patch) | |
tree | 2f394e8013f5badd1964ff772958fc8d10f23ab2 | |
parent | 01349850b0ceed7ca1653d500b417c99e144bc65 (diff) | |
parent | 4c5959e1f5c307b199e274f6efb5680360ad5040 (diff) | |
download | nextcloud-server-e0af42d12467fd7b7abe63adf7eebca14ff1d8f5.tar.gz nextcloud-server-e0af42d12467fd7b7abe63adf7eebca14ff1d8f5.zip |
Merge pull request #5389 from owncloud/fix_shell_exec
only call shell_exec if enabled
-rw-r--r-- | lib/private/preview/movies.php | 2 | ||||
-rw-r--r-- | lib/private/preview/office.php | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/preview/movies.php b/lib/private/preview/movies.php index dc50d160346..4d85e23c63c 100644 --- a/lib/private/preview/movies.php +++ b/lib/private/preview/movies.php @@ -11,7 +11,7 @@ namespace OC\Preview; // movie preview is currently not supported on Windows if (!\OC_Util::runningOnWindows()) { $isShellExecEnabled = !in_array('shell_exec', explode(', ', ini_get('disable_functions'))); - $whichAVCONV = shell_exec('which avconv'); + $whichAVCONV = ($isShellExecEnabled ? shell_exec('which avconv') : ''); $isAVCONVAvailable = !empty($whichAVCONV); if($isShellExecEnabled && $isAVCONVAvailable) { diff --git a/lib/private/preview/office.php b/lib/private/preview/office.php index 673b16edc19..318ab51f851 100644 --- a/lib/private/preview/office.php +++ b/lib/private/preview/office.php @@ -9,11 +9,11 @@ if (extension_loaded('imagick')) { $isShellExecEnabled = !in_array('shell_exec', explode(', ', ini_get('disable_functions'))); - // movie preview is currently not supported on Windows + // LibreOffice preview is currently not supported on Windows if (!\OC_Util::runningOnWindows()) { - $whichLibreOffice = shell_exec('which libreoffice'); + $whichLibreOffice = ($isShellExecEnabled ? shell_exec('which libreoffice') : ''); $isLibreOfficeAvailable = !empty($whichLibreOffice); - $whichOpenOffice = shell_exec('which libreoffice'); + $whichOpenOffice = ($isShellExecEnabled ? shell_exec('which libreoffice') : ''); $isOpenOfficeAvailable = !empty($whichOpenOffice); //let's see if there is libreoffice or openoffice on this machine if($isShellExecEnabled && ($isLibreOfficeAvailable || $isOpenOfficeAvailable || is_string(\OC_Config::getValue('preview_libreoffice_path', null)))) { |