aboutsummaryrefslogtreecommitdiffstats
path: root/settings/admin.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-11-20 12:37:59 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-11-20 12:37:59 +0100
commit64421d76fdd8b718c3f0fccf94ba0028adc593b4 (patch)
tree421c49dbb2f8770d7a963d0fab0d1f4b8845d66b /settings/admin.php
parente32968cfcea295f21336c1cda0bbe8d7a107b1eb (diff)
downloadnextcloud-server-64421d76fdd8b718c3f0fccf94ba0028adc593b4.tar.gz
nextcloud-server-64421d76fdd8b718c3f0fccf94ba0028adc593b4.zip
Deduplicate function by moving it to the OC_Helper
Diffstat (limited to 'settings/admin.php')
-rw-r--r--settings/admin.php18
1 files changed, 1 insertions, 17 deletions
diff --git a/settings/admin.php b/settings/admin.php
index 2b964613096..a669974891c 100644
--- a/settings/admin.php
+++ b/settings/admin.php
@@ -17,7 +17,7 @@ $config = \OC::$server->getConfig();
$appConfig = \OC::$server->getAppConfig();
// Should we display sendmail as an option?
-$template->assign('sendmail_is_available', (bool)findBinaryPath('sendmail'));
+$template->assign('sendmail_is_available', (bool) \OC_Helper::findBinaryPath('sendmail'));
$template->assign('loglevel', $config->getSystemValue("loglevel", 2));
$template->assign('mail_domain', $config->getSystemValue("mail_domain", ''));
@@ -115,19 +115,3 @@ $formsAndMore[] = array('anchor' => 'log-section', 'section-name' => $l->t('Log'
$template->assign('forms', $formsAndMore);
$template->printPage();
-
-/**
- * Try to find a program
- *
- * @param string $program
- * @return null|string
- */
-function findBinaryPath($program) {
- if (!\OC_Util::runningOnWindows() && \OC_Helper::is_function_enabled('exec')) {
- exec('command -v ' . escapeshellarg($program) . ' 2> /dev/null', $output, $returnCode);
- if ($returnCode === 0 && count($output) > 0) {
- return escapeshellcmd($output[0]);
- }
- }
- return null;
-}