diff --git a/lib/phpmailer/class.smtp.php b/lib/phpmailer/class.smtp.php index ed372e3e2e..d8bfd6f136 100644 --- a/lib/phpmailer/class.smtp.php +++ b/lib/phpmailer/class.smtp.php @@ -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", diff --git a/module/search/model.php b/module/search/model.php index 7613f08ec7..a059601192 100644 --- a/module/search/model.php +++ b/module/search/model.php @@ -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; } diff --git a/module/translate/model.php b/module/translate/model.php index 82b0ce25cc..932ec13f53 100644 --- a/module/translate/model.php +++ b/module/translate/model.php @@ -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);