From 07a84aa5ebc71c1476f89eb5736754b7a2f74d47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Tue, 7 Jan 2014 14:52:18 +0100 Subject: [PATCH] reuse existing helper function OC_Helper::is_function_enabled --- lib/private/preview/movies.php | 2 +- lib/private/preview/office.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/private/preview/movies.php b/lib/private/preview/movies.php index ac771deb41..71cd3bae05 100644 --- a/lib/private/preview/movies.php +++ b/lib/private/preview/movies.php @@ -18,7 +18,7 @@ function findBinaryPath($program) { // movie preview is currently not supported on Windows if (!\OC_Util::runningOnWindows()) { - $isExecEnabled = !in_array('exec', explode(', ', ini_get('disable_functions'))); + $isExecEnabled = \OC_Helper::is_function_enabled('exec'); $ffmpegBinary = null; $avconvBinary = null; diff --git a/lib/private/preview/office.php b/lib/private/preview/office.php index 318ab51f85..7a4826c76e 100644 --- a/lib/private/preview/office.php +++ b/lib/private/preview/office.php @@ -7,7 +7,7 @@ */ //both, libreoffice backend and php fallback, need imagick if (extension_loaded('imagick')) { - $isShellExecEnabled = !in_array('shell_exec', explode(', ', ini_get('disable_functions'))); + $isShellExecEnabled = \OC_Helper::is_function_enabled('shell_exec'); // LibreOffice preview is currently not supported on Windows if (!\OC_Util::runningOnWindows()) {