mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 07:04:57 +00:00
add 'lazy ssl' and 'force from'
This commit is contained in:
parent
32f2cffa9f
commit
55bd02fdea
|
@ -227,6 +227,8 @@ class Settings { /* {{{ */
|
|||
var $_allowReviewerOnly = true;
|
||||
// enable/disable log system
|
||||
var $_logFileEnable = true;
|
||||
// enable/disable log system
|
||||
var $_logFileMaxLevel = 6; // PEAR_LOG_INFO
|
||||
// the log file rotation
|
||||
var $_logFileRotation = "d";
|
||||
// Enable file upload by fine-uploader (was 'jumploader')
|
||||
|
@ -628,6 +630,7 @@ class Settings { /* {{{ */
|
|||
$this->_proxyUser = strval($tab["proxyUser"]);
|
||||
$this->_proxyPassword = strval($tab["proxyPassword"]);
|
||||
$this->_logFileEnable = Settings::boolVal($tab["logFileEnable"]);
|
||||
$this->_logFileMaxLevel = strval($tab["logFileMaxLevel"]);
|
||||
$this->_logFileRotation = strval($tab["logFileRotation"]);
|
||||
$this->_enableLargeFileUpload = Settings::boolVal($tab["enableLargeFileUpload"]);
|
||||
$this->_partitionSize = strval($tab["partitionSize"]);
|
||||
|
@ -739,6 +742,8 @@ class Settings { /* {{{ */
|
|||
$this->_smtpSendFrom = strval($tab["smtpSendFrom"]);
|
||||
else
|
||||
$this->_smtpSendFrom = ini_get("sendmail_from");
|
||||
$this->_smtpForceFrom = Settings::boolVal($tab["smtpForceFrom"]);
|
||||
$this->_smtpLazySSL = Settings::boolVal($tab["smtpLazySSL"]);
|
||||
// smtpUser
|
||||
$this->_smtpUser = strval($tab["smtpUser"]);
|
||||
$this->_smtpPassword = strval($tab["smtpPassword"]);
|
||||
|
@ -1021,6 +1026,7 @@ class Settings { /* {{{ */
|
|||
$this->setXMLAttributValue($node, "proxyUser", $this->_proxyUser);
|
||||
$this->setXMLAttributValue($node, "proxyPassword", $this->_proxyPassword);
|
||||
$this->setXMLAttributValue($node, "logFileEnable", $this->_logFileEnable);
|
||||
$this->setXMLAttributValue($node, "logFileMaxLevel", $this->_logFileMaxLevel);
|
||||
$this->setXMLAttributValue($node, "logFileRotation", $this->_logFileRotation);
|
||||
$this->setXMLAttributValue($node, "enableLargeFileUpload", $this->_enableLargeFileUpload);
|
||||
$this->setXMLAttributValue($node, "partitionSize", $this->_partitionSize);
|
||||
|
@ -1112,6 +1118,8 @@ class Settings { /* {{{ */
|
|||
$this->setXMLAttributValue($node, "smtpServer", $this->_smtpServer);
|
||||
$this->setXMLAttributValue($node, "smtpPort", $this->_smtpPort);
|
||||
$this->setXMLAttributValue($node, "smtpSendFrom", $this->_smtpSendFrom);
|
||||
$this->setXMLAttributValue($node, "smtpForceFrom", $this->_smtpForceFrom);
|
||||
$this->setXMLAttributValue($node, "smtpLazySSL", $this->_smtpLazySSL);
|
||||
$this->setXMLAttributValue($node, "smtpUser", $this->_smtpUser);
|
||||
$this->setXMLAttributValue($node, "smtpPassword", $this->_smtpPassword);
|
||||
|
||||
|
|
|
@ -187,6 +187,7 @@ if ($action == "saveSettings")
|
|||
setDirValue("proxyUser");
|
||||
setDirValue("proxyPassword");
|
||||
setBoolValue("logFileEnable");
|
||||
setIntValue("logFileMaxLevel");
|
||||
setStrValue("logFileRotation");
|
||||
setBoolValue("enableLargeFileUpload");
|
||||
setStrValue("partitionSize"); // TODO: check if valid value, e.g. 1M or 5K
|
||||
|
@ -227,6 +228,8 @@ if ($action == "saveSettings")
|
|||
setStrValue("smtpServer");
|
||||
setIntValue("smtpPort");
|
||||
setStrValue("smtpSendFrom");
|
||||
setBoolValue("smtpForceFrom");
|
||||
setBoolValue("smtpLazySSL");
|
||||
setStrValue("smtpUser");
|
||||
setStrValue("smtpPassword");
|
||||
|
||||
|
|
|
@ -31,6 +31,21 @@
|
|||
*/
|
||||
class SeedDMS_View_Settings extends SeedDMS_Theme_Style {
|
||||
|
||||
/**
|
||||
* Add ' ' after integer
|
||||
*
|
||||
* This is a hack to create array keys made of numbers to be
|
||||
* kept as strings. An array element key made of numbers is treated
|
||||
* like an index, though it is a string.
|
||||
* E.g. array('3'=>'foo', '5'=>bar) will be an indexed array, but
|
||||
* array('3 '=>'foo', '5 '=>bar) will be an associated array
|
||||
* showConfigOption() will remove the ' ' but use the key as an
|
||||
* option value, which it wouldn't if the array was indexed.
|
||||
*/
|
||||
static protected function int2str($i) { /* {{{ */
|
||||
return (string) $i." ";
|
||||
} /* }}} */
|
||||
|
||||
protected function showStartPaneContent($name, $isactive) { /* {{{ */
|
||||
parent::showStartPaneContent($name, $isactive);
|
||||
$this->contentContainerStart();
|
||||
|
@ -475,6 +490,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
|
|||
<?php $this->showConfigText('settings_proxyUser', 'proxyUser'); ?>
|
||||
<?php $this->showConfigText('settings_proxyUPassword', 'proxyPassword', 'password'); ?>
|
||||
<?php $this->showConfigCheckbox('settings_logFileEnable', 'logFileEnable'); ?>
|
||||
<?php $this->showConfigOption('settings_logFileMaxLevel', 'logFileMaxLevel', array(self::int2str(PEAR_LOG_EMERG)=>'settings_logLevelEmergency', self::int2str(PEAR_LOG_ALERT)=>'settings_logLevelAlert', self::int2str(PEAR_LOG_CRIT)=>'settings_logLevelCritical', self::int2str(PEAR_LOG_ERR)=>'settings_logLevelError', self::int2str(PEAR_LOG_WARNING)=>'settings_logLevelWarning', self::int2str(PEAR_LOG_NOTICE)=>'settings_logLevelNotice', self::int2str(PEAR_LOG_INFO)=>'settings_logLevelInfo', self::int2str(PEAR_LOG_DEBUG)=>'settings_logLevelDebug'), false, true); ?>
|
||||
<?php $this->showConfigOption('settings_logFileRotation', 'logFileRotation', array('h'=>'hourly', 'd'=>'daily', 'm'=>'monthly'), false, true); ?>
|
||||
<?php $this->showConfigCheckbox('settings_enableLargeFileUpload', 'enableLargeFileUpload'); ?>
|
||||
<?php $this->showConfigText('settings_partitionSize', 'partitionSize'); ?>
|
||||
|
@ -523,6 +539,8 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
|
|||
<?php $this->showConfigText('settings_smtpServer', 'smtpServer'); ?>
|
||||
<?php $this->showConfigText('settings_smtpPort', 'smtpPort'); ?>
|
||||
<?php $this->showConfigText('settings_smtpSendFrom', 'smtpSendFrom'); ?>
|
||||
<?php $this->showConfigCheckbox('settings_smtpForceFrom', 'smtpForceFrom'); ?>
|
||||
<?php $this->showConfigCheckbox('settings_smtpLazySSL', 'smtpLazySSL'); ?>
|
||||
<?php $this->showConfigText('settings_smtpUser', 'smtpUser'); ?>
|
||||
<?php $this->showConfigText('settings_smtpPassword', 'smtpPassword', 'password'); ?>
|
||||
<?php $this->showConfigPlain(htmlspecialchars(getMLText('settings_smtpSendTestMail')), htmlspecialchars(getMLText('settings_smtpSendTestMail_desc')), '<a class="btn btn-secondary sendtestmail">'.getMLText('send_test_mail').'</a><div><pre id="maildebug">You will see debug messages here</pre></div>'); ?>
|
||||
|
@ -840,8 +858,8 @@ if(is_writeable($settings->_configFilePath)) {
|
|||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* tab-width: 2
|
||||
* c-basic-offset: 2
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
* vim600: fdm=marker
|
||||
|
|
Loading…
Reference in New Issue
Block a user