@@ -85,8 +85,7 @@ |
||
85 | 85 | // Create the underlying PDO object |
86 | 86 | self::$pdo = new PDO( |
87 | 87 | (substr($DBHOST, 0, 1) === '/' ? |
88 | - "mysql:unix_socket={$DBHOST};dbname={$DBNAME}" : |
|
89 | - "mysql:host={$DBHOST};dbname={$DBNAME};port={$DBPORT}" |
|
88 | + "mysql:unix_socket={$DBHOST};dbname={$DBNAME}" : "mysql:host={$DBHOST};dbname={$DBNAME};port={$DBPORT}" |
|
90 | 89 | ), |
91 | 90 | $DBUSER, $DBPASS, |
92 | 91 | array( |
@@ -45,15 +45,15 @@ discard block |
||
45 | 45 | */ |
46 | 46 | public static function send(Tree $tree, $to_email, $to_name, $replyto_email, $replyto_name, $subject, $message) { |
47 | 47 | try { |
48 | - $mail = Swift_Message::newInstance() |
|
49 | - ->setSubject($subject) |
|
50 | - ->setFrom(Site::getPreference('SMTP_FROM_NAME'), $tree->getPreference('title')) |
|
51 | - ->setTo($to_email, $to_name) |
|
52 | - ->setReplyTo($replyto_email, $replyto_name) |
|
53 | - ->setBody($message, 'text/html') |
|
54 | - ->addPart(Filter::unescapeHtml($message), 'text/plain'); |
|
48 | + $mail = Swift_Message::newInstance() |
|
49 | + ->setSubject($subject) |
|
50 | + ->setFrom(Site::getPreference('SMTP_FROM_NAME'), $tree->getPreference('title')) |
|
51 | + ->setTo($to_email, $to_name) |
|
52 | + ->setReplyTo($replyto_email, $replyto_name) |
|
53 | + ->setBody($message, 'text/html') |
|
54 | + ->addPart(Filter::unescapeHtml($message), 'text/plain'); |
|
55 | 55 | |
56 | - Swift_Mailer::newInstance(self::transport())->send($mail); |
|
56 | + Swift_Mailer::newInstance(self::transport())->send($mail); |
|
57 | 57 | } catch (Exception $ex) { |
58 | 58 | Log::addErrorLog('Mail: ' . $ex->getMessage()); |
59 | 59 | |
@@ -93,20 +93,20 @@ discard block |
||
93 | 93 | case 'internal': |
94 | 94 | return Swift_MailTransport::newInstance(); |
95 | 95 | case 'external': |
96 | - $transport = Swift_SmtpTransport::newInstance() |
|
97 | - ->setHost(Site::getPreference('SMTP_HOST')) |
|
98 | - ->setPort(Site::getPreference('SMTP_PORT')) |
|
99 | - ->setLocalDomain(Site::getPreference('SMTP_HELO')); |
|
96 | + $transport = Swift_SmtpTransport::newInstance() |
|
97 | + ->setHost(Site::getPreference('SMTP_HOST')) |
|
98 | + ->setPort(Site::getPreference('SMTP_PORT')) |
|
99 | + ->setLocalDomain(Site::getPreference('SMTP_HELO')); |
|
100 | 100 | |
101 | - if (Site::getPreference('SMTP_AUTH')) { |
|
102 | - $transport |
|
103 | - ->setUsername(Site::getPreference('SMTP_AUTH_USER')) |
|
104 | - ->setPassword(Site::getPreference('SMTP_AUTH_PASS')); |
|
105 | - } |
|
101 | + if (Site::getPreference('SMTP_AUTH')) { |
|
102 | + $transport |
|
103 | + ->setUsername(Site::getPreference('SMTP_AUTH_USER')) |
|
104 | + ->setPassword(Site::getPreference('SMTP_AUTH_PASS')); |
|
105 | + } |
|
106 | 106 | |
107 | - if (Site::getPreference('SMTP_SSL') !== 'none') { |
|
108 | - $transport->setEncryption(Site::getPreference('SMTP_SSL')); |
|
109 | - } |
|
107 | + if (Site::getPreference('SMTP_SSL') !== 'none') { |
|
108 | + $transport->setEncryption(Site::getPreference('SMTP_SSL')); |
|
109 | + } |
|
110 | 110 | |
111 | 111 | return $transport; |
112 | 112 | default: |
@@ -1717,7 +1717,7 @@ |
||
1717 | 1717 | if ($endjd === $startjd) { |
1718 | 1718 | $html .= I18N::translate('No events exist for tomorrow.'); |
1719 | 1719 | } else { |
1720 | - $html .= /* I18N: translation for %s==1 is unused; it is translated separately as “tomorrow” */ I18N::plural('No events exist for the next %s day.', 'No events exist for the next %s days.', $endjd - $startjd + 1, I18N::number($endjd - $startjd + 1)); |
|
1720 | + $html .= /* I18N: translation for %s==1 is unused; it is translated separately as “tomorrow” */ I18N::plural('No events exist for the next %s day.', 'No events exist for the next %s days.', $endjd - $startjd + 1, I18N::number($endjd - $startjd + 1)); |
|
1721 | 1721 | } |
1722 | 1722 | } else { |
1723 | 1723 | if ($endjd === $startjd) { |
@@ -1490,7 +1490,7 @@ |
||
1490 | 1490 | '1' => I18N::translateContext('Show the [first/last] [N] parts of a place name.', 'last'), |
1491 | 1491 | ], $WT_TREE->getPreference('SHOW_PEDIGREE_PLACES_SUFFIX') |
1492 | 1492 | ), |
1493 | - Bootstrap4::select('SHOW_PEDIGREE_PLACES', FunctionsEdit::optionsIntegers(range(1,9)), $WT_TREE->getPreference('SHOW_PEDIGREE_PLACES')) |
|
1493 | + Bootstrap4::select('SHOW_PEDIGREE_PLACES', FunctionsEdit::optionsIntegers(range(1, 9)), $WT_TREE->getPreference('SHOW_PEDIGREE_PLACES')) |
|
1494 | 1494 | ); ?> |
1495 | 1495 | <p class="small text-muted"> |
1496 | 1496 | <?php echo /* I18N: Help text for the “Abbreviate place names” configuration setting */ I18N::translate('Place names are frequently too long to fit on charts, lists, etc. They can be abbreviated by showing just the first few parts of the name, such as <i>village, county</i>, or the last few part of it, such as <i>region, country</i>.'); ?> |