@@ -20,7 +20,6 @@ |
||
20 | 20 | use Fisharebest\Webtrees\Family; |
21 | 21 | use Fisharebest\Webtrees\Filter; |
22 | 22 | use Fisharebest\Webtrees\GedcomCode\GedcomCodePedi; |
23 | -use Fisharebest\Webtrees\GedcomTag; |
|
24 | 23 | use Fisharebest\Webtrees\I18N; |
25 | 24 | use Fisharebest\Webtrees\Individual; |
26 | 25 | use Fisharebest\Webtrees\Soundex; |
@@ -23,7 +23,6 @@ |
||
23 | 23 | use Fisharebest\Webtrees\Functions\Functions; |
24 | 24 | use Fisharebest\Webtrees\Functions\FunctionsDb; |
25 | 25 | use Fisharebest\Webtrees\GedcomRecord; |
26 | -use Fisharebest\Webtrees\GedcomTag; |
|
27 | 26 | use Fisharebest\Webtrees\I18N; |
28 | 27 | use Fisharebest\Webtrees\Individual; |
29 | 28 | use Fisharebest\Webtrees\Menu; |
@@ -247,7 +247,7 @@ |
||
247 | 247 | /** |
248 | 248 | * Which months follows this one? Calendars with leap-months should provide their own implementation. |
249 | 249 | * |
250 | - * @return int[] |
|
250 | + * @return integer[] |
|
251 | 251 | */ |
252 | 252 | protected function nextMonth() { |
253 | 253 | if ($this->m == 6 && !$this->isLeapYear()) { |
@@ -103,7 +103,8 @@ discard block |
||
103 | 103 | <?php if ($ancestors_only === '1'): ?> |
104 | 104 | <input type="hidden" name="ancestors" value="1"> |
105 | 105 | <?php echo I18N::translate('Find relationships via ancestors') ?> |
106 | - <?php else: ?> |
|
106 | + <?php else { |
|
107 | + : ?> |
|
107 | 108 | <label> |
108 | 109 | <input type="radio" name="ancestors" value="0" <?php echo $ancestors == 0 ? 'checked' : '' ?>> |
109 | 110 | <?php echo I18N::translate('Find any relationship') ?> |
@@ -113,14 +114,17 @@ discard block |
||
113 | 114 | <input type="radio" name="ancestors" value="1" <?php echo $ancestors == 1 ? 'checked' : '' ?>> |
114 | 115 | <?php echo I18N::translate('Find relationships via ancestors') ?> |
115 | 116 | </label> |
116 | - <?php endif; ?> |
|
117 | + <?php endif; |
|
118 | +} |
|
119 | +?> |
|
117 | 120 | |
118 | 121 | <hr> |
119 | 122 | |
120 | 123 | <?php if ($max_recursion == 0): ?> |
121 | 124 | <?php echo I18N::translate('Find the closest relationships') ?> |
122 | 125 | <input type="hidden" name="recursion" value="0"> |
123 | - <?php else: ?> |
|
126 | + <?php else { |
|
127 | + : ?> |
|
124 | 128 | <label> |
125 | 129 | <input type="radio" name="recursion" value="0" <?php echo $recursion == 0 ? 'checked' : '' ?>> |
126 | 130 | <?php echo I18N::translate('Find the closest relationships') ?> |
@@ -132,7 +136,9 @@ discard block |
||
132 | 136 | <?php echo I18N::translate('Find all possible relationships') ?> |
133 | 137 | <?php else: ?> |
134 | 138 | <?php echo I18N::translate('Find other relationships') ?> |
135 | - <?php endif; ?> |
|
139 | + <?php endif; |
|
140 | +} |
|
141 | +?> |
|
136 | 142 | </label> |
137 | 143 | <?php endif; ?> |
138 | 144 | </td> |
@@ -183,8 +183,11 @@ |
||
183 | 183 | <div class="value"> |
184 | 184 | <?php if ($my_individual_record): ?> |
185 | 185 | <?php echo $my_individual_record->formatList('span'); ?> |
186 | - <?php else: ?> |
|
187 | - <?php echo I18N::translateContext('unknown people', 'Unknown'); ?> |
|
186 | + <?php else { |
|
187 | + : ?> |
|
188 | + <?php echo I18N::translateContext('unknown people', 'Unknown'); |
|
189 | +} |
|
190 | +?> |
|
188 | 191 | <?php endif; ?> |
189 | 192 | <p class="small text-muted"> |
190 | 193 | <?php echo I18N::translate('This is a link to your own record in the family tree. If this is the wrong individual, contact an administrator.'); ?> |
@@ -842,7 +842,7 @@ |
||
842 | 842 | /** |
843 | 843 | * Which months follows this one? Calendars with leap-months should provide their own implementation. |
844 | 844 | * |
845 | - * @return int[] |
|
845 | + * @return integer[] |
|
846 | 846 | */ |
847 | 847 | protected function nextMonth() { |
848 | 848 | return [$this->m === $this->calendar->monthsInYear() ? $this->nextYear($this->y) : $this->y, ($this->m % $this->calendar->monthsInYear()) + 1]; |
@@ -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 | [ |
@@ -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_Preferences; |
@@ -103,20 +103,20 @@ |
||
103 | 103 | case 'sendmail': |
104 | 104 | return Swift_SendmailTransport::newInstance(); |
105 | 105 | case 'external': |
106 | - $transport = Swift_SmtpTransport::newInstance() |
|
107 | - ->setHost(Site::getPreference('SMTP_HOST')) |
|
108 | - ->setPort(Site::getPreference('SMTP_PORT')) |
|
109 | - ->setLocalDomain(Site::getPreference('SMTP_HELO')); |
|
106 | + $transport = Swift_SmtpTransport::newInstance() |
|
107 | + ->setHost(Site::getPreference('SMTP_HOST')) |
|
108 | + ->setPort(Site::getPreference('SMTP_PORT')) |
|
109 | + ->setLocalDomain(Site::getPreference('SMTP_HELO')); |
|
110 | 110 | |
111 | - if (Site::getPreference('SMTP_AUTH')) { |
|
112 | - $transport |
|
113 | - ->setUsername(Site::getPreference('SMTP_AUTH_USER')) |
|
114 | - ->setPassword(Site::getPreference('SMTP_AUTH_PASS')); |
|
115 | - } |
|
111 | + if (Site::getPreference('SMTP_AUTH')) { |
|
112 | + $transport |
|
113 | + ->setUsername(Site::getPreference('SMTP_AUTH_USER')) |
|
114 | + ->setPassword(Site::getPreference('SMTP_AUTH_PASS')); |
|
115 | + } |
|
116 | 116 | |
117 | - if (Site::getPreference('SMTP_SSL') !== 'none') { |
|
118 | - $transport->setEncryption(Site::getPreference('SMTP_SSL')); |
|
119 | - } |
|
117 | + if (Site::getPreference('SMTP_SSL') !== 'none') { |
|
118 | + $transport->setEncryption(Site::getPreference('SMTP_SSL')); |
|
119 | + } |
|
120 | 120 | |
121 | 121 | return $transport; |
122 | 122 | default: |
@@ -648,14 +648,17 @@ |
||
648 | 648 | <div dir="ltr"> |
649 | 649 | <?php if (count($media_folders) > 1): ?> |
650 | 650 | <?php echo WT_DATA_DIR, FunctionsEdit::selectEditControl('media_folder', $media_folders, null, $media_folder, 'onchange="this.form.submit();"'); ?> |
651 | - <?php else: ?> |
|
651 | + <?php else { |
|
652 | + : ?> |
|
652 | 653 | <?= WT_DATA_DIR, Filter::escapeHtml($media_folder) ?> |
653 | 654 | <input type="hidden" name="media_folder" value="<?= Filter::escapeHtml($media_folder) ?>"> |
654 | 655 | <?php endif ?> |
655 | 656 | </div> |
656 | 657 | |
657 | 658 | <?php if (count($media_paths) > 1): ?> |
658 | - <?php echo FunctionsEdit::selectEditControl('media_path', $media_paths, null, $media_path, 'onchange="this.form.submit();"'); ?> |
|
659 | + <?php echo FunctionsEdit::selectEditControl('media_path', $media_paths, null, $media_path, 'onchange="this.form.submit();"'); |
|
660 | +} |
|
661 | +?> |
|
659 | 662 | <?php else: ?> |
660 | 663 | <?= Filter::escapeHtml($media_path) ?> |
661 | 664 | <input type="hidden" name="media_path" value="<?= Filter::escapeHtml($media_path) ?>"> |