aboutsummaryrefslogtreecommitdiffstats
path: root/settings/admin.php
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2014-03-21 20:23:31 +0100
committerkondou <kondou@ts.unde.re>2014-03-21 20:23:31 +0100
commitdda7129a243c7ebdbcdf9c2b5dbf167542402bc2 (patch)
treed03dff6783ebabb6273a19ed59a6b9b3731e923e /settings/admin.php
parent556c6eca2397eaa03c4503822d647c8b6cb5e70e (diff)
parent4be0b3f6cce540282c6745d6bf3d2a0fa4ac65b4 (diff)
downloadnextcloud-server-dda7129a243c7ebdbcdf9c2b5dbf167542402bc2.tar.gz
nextcloud-server-dda7129a243c7ebdbcdf9c2b5dbf167542402bc2.zip
Merge branch 'master' of https://github.com/owncloud/core into last_cron_log
Diffstat (limited to 'settings/admin.php')
-rwxr-xr-xsettings/admin.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/settings/admin.php b/settings/admin.php
index bbb494a0f8b..23b3a2d5a0e 100755
--- a/settings/admin.php
+++ b/settings/admin.php
@@ -20,6 +20,11 @@ $htaccessworking=OC_Util::isHtAccessWorking();
$entries=OC_Log_Owncloud::getEntries(3);
$entriesremain = count(OC_Log_Owncloud::getEntries(4)) > 3;
+// Should we display sendmail as an option?
+if (findBinaryPath('sendmailsendmail')) {
+ $tmpl->assign('sendmail_is_available', true);
+}
+
$tmpl->assign('loglevel', OC_Config::getValue( "loglevel", 2 ));
$tmpl->assign('mail_domain', OC_Config::getValue( "mail_domain", '' ));
$tmpl->assign('mail_from_address', OC_Config::getValue( "mail_from_address", '' ));
@@ -63,3 +68,17 @@ foreach($forms as $form) {
$tmpl->append('forms', $form);
}
$tmpl->printPage();
+
+/**
+ * Try to find a programm
+ *
+ * @param string $program
+ * @return null|string
+ */
+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;
+}