@@ -139,8 +139,11 @@ discard block |
||
| 139 | 139 | <div class="font9"> |
| 140 | 140 | <?php echo $spouse->getLifeSpan(); ?> |
| 141 | 141 | </div> |
| 142 | - <?php else: ?> |
|
| 143 | - <?php echo $spouse->getFullName(); ?> |
|
| 142 | + <?php else { |
|
| 143 | + : ?> |
|
| 144 | + <?php echo $spouse->getFullName(); |
|
| 145 | +} |
|
| 146 | +?> |
|
| 144 | 147 | <?php endif; ?> |
| 145 | 148 | </td> |
| 146 | 149 | </tr> |
@@ -164,8 +167,11 @@ discard block |
||
| 164 | 167 | <div class="font9"> |
| 165 | 168 | <?php echo $child->getLifeSpan(); ?> |
| 166 | 169 | </div> |
| 167 | - <?php else: ?> |
|
| 168 | - <?php echo $child->getFullName(); ?> |
|
| 170 | + <?php else { |
|
| 171 | + : ?> |
|
| 172 | + <?php echo $child->getFullName(); |
|
| 173 | +} |
|
| 174 | +?> |
|
| 169 | 175 | <?php endif; ?> |
| 170 | 176 | </td> |
| 171 | 177 | </tr> |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | /** |
| 102 | 102 | * Get the male (or first female) partner of the family |
| 103 | 103 | * |
| 104 | - * @param $access_level int|null |
|
| 104 | + * @param integer $access_level int|null |
|
| 105 | 105 | * |
| 106 | 106 | * @return Individual|null |
| 107 | 107 | */ |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | /** |
| 119 | 119 | * Get the female (or second male) partner of the family |
| 120 | 120 | * |
| 121 | - * @param $access_level int|null |
|
| 121 | + * @param integer $access_level int|null |
|
| 122 | 122 | * |
| 123 | 123 | * @return Individual|null |
| 124 | 124 | */ |
@@ -388,7 +388,7 @@ |
||
| 388 | 388 | * (b) Level 1 object with the Highlight option missing or set to other than "Y" or "N" |
| 389 | 389 | * (c) Level 2 or higher object with the Highlight option set to "Y" |
| 390 | 390 | * |
| 391 | - * @return null|Media |
|
| 391 | + * @return GedcomRecord|null |
|
| 392 | 392 | */ |
| 393 | 393 | public function findHighlightedMedia() { |
| 394 | 394 | $objectA = null; |
@@ -142,7 +142,7 @@ |
||
| 142 | 142 | * |
| 143 | 143 | * @param int $fetch_style |
| 144 | 144 | * |
| 145 | - * @return \stdClass|array|null |
|
| 145 | + * @return \stdClass |
|
| 146 | 146 | */ |
| 147 | 147 | public function fetchOneRow($fetch_style = PDO::FETCH_OBJ) { |
| 148 | 148 | if (!$this->executed) { |
@@ -16,8 +16,8 @@ |
||
| 16 | 16 | namespace Fisharebest\Webtrees; |
| 17 | 17 | |
| 18 | 18 | use Exception; |
| 19 | -use Swift_Mailer; |
|
| 20 | 19 | use Swift_MailTransport; |
| 20 | +use Swift_Mailer; |
|
| 21 | 21 | use Swift_Message; |
| 22 | 22 | use Swift_NullTransport; |
| 23 | 23 | use Swift_SmtpTransport; |
@@ -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: |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | * @param string $xref2 |
| 160 | 160 | * @param int $tree_id |
| 161 | 161 | * |
| 162 | - * @return array |
|
| 162 | + * @return string[] |
|
| 163 | 163 | */ |
| 164 | 164 | private function allAncestors($xref1, $xref2, $tree_id) { |
| 165 | 165 | $ancestors = array($xref1, $xref2); |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | * @param string $xref2 |
| 199 | 199 | * @param int $tree_id |
| 200 | 200 | * |
| 201 | - * @return array |
|
| 201 | + * @return string[] |
|
| 202 | 202 | */ |
| 203 | 203 | private function excludeFamilies($xref1, $xref2, $tree_id) { |
| 204 | 204 | return Database::prepare( |
@@ -102,7 +102,8 @@ discard block |
||
| 102 | 102 | <td class="optionbox"> |
| 103 | 103 | <?php if ($ancestors_only === '1'): ?> |
| 104 | 104 | <input type="hidden" name="ancestors" value="1"> |
| 105 | - <?php else: ?> |
|
| 105 | + <?php else { |
|
| 106 | + : ?> |
|
| 106 | 107 | <label> |
| 107 | 108 | <input type="radio" name="ancestors" value="0" <?php echo $ancestors == 0 ? 'checked' : '' ?>> |
| 108 | 109 | <?php echo I18N::translate('Find any relationship') ?> |
@@ -114,12 +115,15 @@ discard block |
||
| 114 | 115 | </label> |
| 115 | 116 | |
| 116 | 117 | <hr> |
| 117 | - <?php endif; ?> |
|
| 118 | + <?php endif; |
|
| 119 | +} |
|
| 120 | +?> |
|
| 118 | 121 | |
| 119 | 122 | <?php if ($max_recursion == 0): ?> |
| 120 | 123 | <?php echo I18N::translate('Find the closest relationships') ?> |
| 121 | 124 | <input type="hidden" name="recursion" value="0"> |
| 122 | - <?php else: ?> |
|
| 125 | + <?php else { |
|
| 126 | + : ?> |
|
| 123 | 127 | <label> |
| 124 | 128 | <input type="radio" name="recursion" value="0" <?php echo $recursion == 0 ? 'checked' : '' ?>> |
| 125 | 129 | <?php echo I18N::translate('Find the closest relationships') ?> |
@@ -131,7 +135,9 @@ discard block |
||
| 131 | 135 | <?php echo I18N::translate('Find all possible relationships') ?> |
| 132 | 136 | <?php else: ?> |
| 133 | 137 | <?php echo I18N::translate('Find other relationships') ?> |
| 134 | - <?php endif; ?> |
|
| 138 | + <?php endif; |
|
| 139 | +} |
|
| 140 | +?> |
|
| 135 | 141 | </label> |
| 136 | 142 | <?php endif; ?> |
| 137 | 143 | </td> |
@@ -1820,24 +1820,24 @@ |
||
| 1820 | 1820 | if ($endjd === WT_CLIENT_JD) { |
| 1821 | 1821 | // We're dealing with the Today’s Events block |
| 1822 | 1822 | if ($filter === 0) { |
| 1823 | - $html .= I18N::translate('No events exist for today.'); |
|
| 1823 | + $html .= I18N::translate('No events exist for today.'); |
|
| 1824 | 1824 | } else { |
| 1825 | - $html .= I18N::translate('No events for living individuals exist for today.'); |
|
| 1825 | + $html .= I18N::translate('No events for living individuals exist for today.'); |
|
| 1826 | 1826 | } |
| 1827 | 1827 | } else { |
| 1828 | 1828 | // We're dealing with the Upcoming Events block |
| 1829 | 1829 | if ($filter === 0) { |
| 1830 | 1830 | if ($endjd === $startjd) { |
| 1831 | - $html .= I18N::translate('No events exist for tomorrow.'); |
|
| 1831 | + $html .= I18N::translate('No events exist for tomorrow.'); |
|
| 1832 | 1832 | } else { |
| 1833 | - $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)); |
|
| 1833 | + $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)); |
|
| 1834 | 1834 | } |
| 1835 | 1835 | } else { |
| 1836 | 1836 | if ($endjd === $startjd) { |
| 1837 | - $html .= I18N::translate('No events for living individuals exist for tomorrow.'); |
|
| 1837 | + $html .= I18N::translate('No events for living individuals exist for tomorrow.'); |
|
| 1838 | 1838 | } else { |
| 1839 | 1839 | // I18N: translation for %s==1 is unused; it is translated separately as “tomorrow” |
| 1840 | - $html .= I18N::plural('No events for living people exist for the next %s day.', 'No events for living people exist for the next %s days.', $endjd - $startjd + 1, I18N::number($endjd - $startjd + 1)); |
|
| 1840 | + $html .= I18N::plural('No events for living people exist for the next %s day.', 'No events for living people exist for the next %s days.', $endjd - $startjd + 1, I18N::number($endjd - $startjd + 1)); |
|
| 1841 | 1841 | } |
| 1842 | 1842 | } |
| 1843 | 1843 | } |