diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-11-20 12:37:59 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-11-20 12:37:59 +0100 |
commit | 64421d76fdd8b718c3f0fccf94ba0028adc593b4 (patch) | |
tree | 421c49dbb2f8770d7a963d0fab0d1f4b8845d66b /lib/private/preview | |
parent | e32968cfcea295f21336c1cda0bbe8d7a107b1eb (diff) | |
download | nextcloud-server-64421d76fdd8b718c3f0fccf94ba0028adc593b4.tar.gz nextcloud-server-64421d76fdd8b718c3f0fccf94ba0028adc593b4.zip |
Deduplicate function by moving it to the OC_Helper
Diffstat (limited to 'lib/private/preview')
-rw-r--r-- | lib/private/preview/movies.php | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/private/preview/movies.php b/lib/private/preview/movies.php index 2a23c2141c1..8217ad24409 100644 --- a/lib/private/preview/movies.php +++ b/lib/private/preview/movies.php @@ -8,14 +8,6 @@ */ namespace OC\Preview; -function findBinaryPath($program) { - exec('command -v ' . escapeshellarg($program) . ' 2> /dev/null', $output, $returnCode); - if ($returnCode === 0 && count($output) > 0) { - return escapeshellcmd($output[0]); - } - return null; -} - // movie preview is currently not supported on Windows if (!\OC_Util::runningOnWindows()) { $isExecEnabled = \OC_Helper::is_function_enabled('exec'); @@ -23,9 +15,9 @@ if (!\OC_Util::runningOnWindows()) { $avconvBinary = null; if ($isExecEnabled) { - $avconvBinary = findBinaryPath('avconv'); + $avconvBinary = \OC_Helper::findBinaryPath('avconv'); if (!$avconvBinary) { - $ffmpegBinary = findBinaryPath('ffmpeg'); + $ffmpegBinary = \OC_Helper::findBinaryPath('ffmpeg'); } } |