Commit 438e4513 by Scott

Merge branch 'dev' into 1.8

parents 1cacbd30 e0e124c4
......@@ -94,6 +94,10 @@ Class names should be of the form `Q2A_<Namespace>_<Class>`, e.g. `Q2A_Util_Debu
Classes are mapped to PHP files with the underscores converted to directory separators. The `Q2A_Util_Debug` class is in the file `qa-include/Q2A/Util/Debug.php`. A class named `Q2A_Db_User_Messages` would be in a file `qa-include/Q2A/Db/User/Messages.php`.
## Documentation
Please see the repository https://github.com/q2a/q2a.github.io/ which automatically produces the documentation website http://docs.question2answer.org/
[Home]: http://www.question2answer.org/
[QA]: http://www.question2answer.org/qa/
......
......@@ -130,15 +130,18 @@
$mailer->From=$params['fromemail'];
$mailer->Sender=$params['fromemail'];
$mailer->FromName=$params['fromname'];
$mailer->AddAddress($params['toemail'], $params['toname']);
$mailer->addAddress($params['toemail'], $params['toname']);
if(!empty($params['replytoemail'])){
$mailer->addReplyTo($params['replytoemail'], $params['replytoname']);
}
$mailer->Subject=$params['subject'];
$mailer->Body=$params['body'];
if ($params['html'])
$mailer->IsHTML(true);
$mailer->isHTML(true);
if (qa_opt('smtp_active')) {
$mailer->IsSMTP();
$mailer->isSMTP();
$mailer->Host=qa_opt('smtp_address');
$mailer->Port=qa_opt('smtp_port');
......@@ -162,7 +165,7 @@
}
}
$send_status = $mailer->Send();
$send_status = $mailer->send();
if(!$send_status){
@error_log('PHP Question2Answer email send error: '.$mailer->ErrorInfo);
}
......
......@@ -57,6 +57,7 @@ if (qa_user_permit_error()) {
// Send the feedback form
$feedbacksent = false;
if (qa_clicked('dofeedback')) {
......@@ -90,8 +91,10 @@ if (qa_clicked('dofeedback')) {
);
if (qa_send_email(array(
'fromemail' => qa_email_validate(@$inemail) ? $inemail : qa_opt('from_email'),
'fromemail' => qa_opt('from_email'),
'fromname' => $inname,
'replytoemail' => qa_email_validate(@$inemail) ? $inemail : null,
'replytoname' => $inname,
'toemail' => qa_opt('feedback_email'),
'toname' => qa_opt('site_title'),
'subject' => qa_lang_sub('emails/feedback_subject', qa_opt('site_title')),
......
......@@ -259,7 +259,7 @@ if ($formtype == 'q_edit') { // ...in edit mode
$microdata = qa_opt('use_microdata');
if ($microdata) {
$qa_content['head_lines'][] = '<meta itemprop="name" content="' . qa_html($qa_content['q_view']['raw']['title']) . '">';
$qa_content['html_tags'] = ' itemscope itemtype="http://schema.org/QAPage"';
$qa_content['html_tags'] .= ' itemscope itemtype="http://schema.org/QAPage"';
$qa_content['main_tags'] = ' itemscope itemtype="http://schema.org/Question"';
}
......
......@@ -484,10 +484,15 @@
$lastcategoryid=count($categoryids) ? end($categoryids) : null;
$charset = 'utf-8';
$language = qa_opt('site_language');
$language = empty($language) ? 'en' : qa_html($language);
$qa_content=array(
'content_type' => 'text/html; charset='.$charset,
'charset' => $charset,
'language' => $language,
'direction' => qa_opt('site_text_direction'),
'options' => array(
......@@ -496,6 +501,8 @@
'site_title' => qa_html(qa_opt('site_title')),
'html_tags' => 'lang="' . $language . '"',
'head_lines' => array(),
'navigation' => array(
......
......@@ -237,7 +237,7 @@ class qa_html_theme_base
$extratags = isset($this->content['html_tags']) ? $this->content['html_tags'] : '';
$this->output(
'<html' . $extratags . '>',
'<html ' . $extratags . '>',
$attribution
);
......
......@@ -120,7 +120,10 @@ class qa_recaptcha_captcha
'}',
);
$qa_content['script_src'][] = 'https://www.google.com/recaptcha/api.js?onload=recaptcha_onload&render=explicit';
$lang = urlencode(qa_opt('site_language'));
if (empty($lang))
$lang = 'en';
$qa_content['script_src'][] = 'https://www.google.com/recaptcha/api.js?onload=recaptcha_onload&render=explicit&hl='.$lang;
return '';
}
......
......@@ -1799,7 +1799,7 @@ blockquote p {
text-transform: none;
line-height: 1em;
margin-left: .2em;
content: '\e82d';
content: '\e821';
}
/*------[ forms ]------*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment