This commit is contained in:
reneeteng
2019-08-01 17:23:48 +08:00
3 changed files with 10 additions and 7 deletions
+6 -5
View File
@@ -126,11 +126,12 @@ class SMTP {
}
// connect to the smtp server
$this->smtp_conn = fsockopen($host, // the host of the server
$port, // the port to use
$errno, // error number if any
$errstr, // error message if any
$tval); // give up after ? secs
// Replace fsockopen for don't validate remote hosts
$contextOptions['ssl']['verify_host'] = false;
$contextOptions['ssl']['verify_peer'] = false;
$contextOptions['ssl']['verify_peer_name'] = false;
$context = stream_context_create($contextOptions);
$this->smtp_conn = stream_socket_client($host . ':' . $port, $errno, $errstr, $tval, STREAM_CLIENT_CONNECT, $context);
// verify we connected properly
if(empty($this->smtp_conn)) {
$this->error = array("error" => "Failed to connect to server",
+3 -1
View File
@@ -36,8 +36,10 @@ class searchModel extends model
/* The built-in modules and user defined modules all have the subStatus field, so set its configuration first. */
if($field->field == 'subStatus')
{
$field = $this->workflowfield->getByField($module, 'subStatus');
$searchConfig['fields'][$field->field] = $field->name;
$searchConfig['params'][$field->field] = array('operator' => '=', 'control' => 'select', 'values' => $this->workflowfield->getSubStatusList($module));
$searchConfig['params'][$field->field] = array('operator' => '=', 'control' => 'select', 'values' => $field->options);
continue;
}
+1 -1
View File
@@ -23,7 +23,7 @@ class translateModel extends model
$data = fixer::input('post')->add('createdBy', $this->app->user->account)->get();
if(empty($data->name)) dao::$errors['name'] = sprintf($this->lang->error->notempty, $this->lang->translate->name);
if(empty($data->code)) dao::$errors['code'] = sprintf($this->lang->error->notempty, $this->lang->translate->code);
if(!baseValidater::checkREG($data->code, '|^[A-Za-z0-9_]+$|')) dao::$errors['code'] = $this->lang->translate->notice->failRuleCode;
if(!baseValidater::checkREG($data->code, '|^[a-z0-9_]+$|')) dao::$errors['code'] = $this->lang->translate->notice->failRuleCode;
if(dao::isError()) return false;
$langs = empty($this->config->global->langs) ? array() : json_decode($this->config->global->langs, true);