@@ -44,7 +44,7 @@ |
||
44 | 44 | $form_pass2 = Filter::post('form_pass2', WT_REGEX_PASSWORD); |
45 | 45 | $form_email = Filter::postEmail('form_email'); |
46 | 46 | $form_rootid = Filter::post('form_rootid', WT_REGEX_XREF); |
47 | -$form_theme = Filter::post('form_theme', implode('|', array_keys(Theme::themeNames())), '');; |
|
47 | +$form_theme = Filter::post('form_theme', implode('|', array_keys(Theme::themeNames())), ''); ; |
|
48 | 48 | $form_language = Filter::post('form_language'); |
49 | 49 | $form_timezone = Filter::post('form_timezone'); |
50 | 50 | $form_contact_method = Filter::post('form_contact_method'); |
@@ -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.'); ?> |
@@ -551,18 +551,24 @@ |
||
551 | 551 | <div class="bg-danger text-danger"> |
552 | 552 | <?php echo $resn->xref, ' — ', I18N::translate('this record does not exist'); ?> |
553 | 553 | </div> |
554 | - <?php else: ?> |
|
554 | + <?php else { |
|
555 | + : ?> |
|
555 | 556 | <div class="text-muted"> |
556 | - <?php echo I18N::translate('All records'); ?> |
|
557 | + <?php echo I18N::translate('All records'); |
|
558 | +} |
|
559 | +?> |
|
557 | 560 | </div> |
558 | 561 | <?php endif; ?> |
559 | 562 | </td> |
560 | 563 | <td> |
561 | 564 | <?php if ($resn->tag_label): ?> |
562 | 565 | <?php echo $resn->tag_label; ?> |
563 | - <?php else: ?> |
|
566 | + <?php else { |
|
567 | + : ?> |
|
564 | 568 | <div class="text-muted"> |
565 | - <?php echo I18N::translate('All facts and events'); ?> |
|
569 | + <?php echo I18N::translate('All facts and events'); |
|
570 | +} |
|
571 | +?> |
|
566 | 572 | </div> |
567 | 573 | <?php endif; ?> |
568 | 574 | </td> |
@@ -98,52 +98,52 @@ |
||
98 | 98 | } |
99 | 99 | |
100 | 100 | switch ($action) { |
101 | - case 'delete': |
|
102 | - $sql_delete = |
|
103 | - "DELETE `##log` FROM `##log`" . |
|
104 | - " LEFT JOIN `##user` USING (user_id)" . // user may be deleted |
|
105 | - " LEFT JOIN `##gedcom` USING (gedcom_id)"; // gedcom may be deleted |
|
106 | - |
|
107 | - Database::prepare($sql_delete . $where)->execute($args); |
|
108 | - break; |
|
109 | - |
|
110 | - case 'export': |
|
111 | - header('Content-Type: text/csv'); |
|
112 | - header('Content-Disposition: attachment; filename="webtrees-logs.csv"'); |
|
113 | - $rows = Database::prepare($sql_select . $where . ' ORDER BY log_id')->execute($args)->fetchAll(); |
|
114 | - foreach ($rows as $row) { |
|
115 | - echo |
|
116 | - '"', $row->log_time, '",', |
|
117 | - '"', $row->log_type, '",', |
|
118 | - '"', str_replace('"', '""', $row->log_message), '",', |
|
119 | - '"', $row->ip_address, '",', |
|
120 | - '"', str_replace('"', '""', $row->user_name), '",', |
|
121 | - '"', str_replace('"', '""', $row->gedcom_name), '"', |
|
122 | - "\n"; |
|
123 | - } |
|
101 | + case 'delete': |
|
102 | + $sql_delete = |
|
103 | + "DELETE `##log` FROM `##log`" . |
|
104 | + " LEFT JOIN `##user` USING (user_id)" . // user may be deleted |
|
105 | + " LEFT JOIN `##gedcom` USING (gedcom_id)"; // gedcom may be deleted |
|
106 | + |
|
107 | + Database::prepare($sql_delete . $where)->execute($args); |
|
108 | + break; |
|
109 | + |
|
110 | + case 'export': |
|
111 | + header('Content-Type: text/csv'); |
|
112 | + header('Content-Disposition: attachment; filename="webtrees-logs.csv"'); |
|
113 | + $rows = Database::prepare($sql_select . $where . ' ORDER BY log_id')->execute($args)->fetchAll(); |
|
114 | + foreach ($rows as $row) { |
|
115 | + echo |
|
116 | + '"', $row->log_time, '",', |
|
117 | + '"', $row->log_type, '",', |
|
118 | + '"', str_replace('"', '""', $row->log_message), '",', |
|
119 | + '"', $row->ip_address, '",', |
|
120 | + '"', str_replace('"', '""', $row->user_name), '",', |
|
121 | + '"', str_replace('"', '""', $row->gedcom_name), '"', |
|
122 | + "\n"; |
|
123 | + } |
|
124 | 124 | |
125 | - return; |
|
126 | - case 'load_json': |
|
127 | - $start = Filter::getInteger('start'); |
|
128 | - $length = Filter::getInteger('length'); |
|
129 | - $order = Filter::getArray('order'); |
|
130 | - |
|
131 | - if ($order) { |
|
132 | - $order_by = " ORDER BY "; |
|
133 | - foreach ($order as $key => $value) { |
|
134 | - if ($key > 0) { |
|
135 | - $order_by .= ','; |
|
136 | - } |
|
137 | - // Datatables numbers columns 0, 1, 2 |
|
138 | - // MySQL numbers columns 1, 2, 3 |
|
139 | - switch ($value['dir']) { |
|
125 | + return; |
|
126 | + case 'load_json': |
|
127 | + $start = Filter::getInteger('start'); |
|
128 | + $length = Filter::getInteger('length'); |
|
129 | + $order = Filter::getArray('order'); |
|
130 | + |
|
131 | + if ($order) { |
|
132 | + $order_by = " ORDER BY "; |
|
133 | + foreach ($order as $key => $value) { |
|
134 | + if ($key > 0) { |
|
135 | + $order_by .= ','; |
|
136 | + } |
|
137 | + // Datatables numbers columns 0, 1, 2 |
|
138 | + // MySQL numbers columns 1, 2, 3 |
|
139 | + switch ($value['dir']) { |
|
140 | 140 | case 'asc': |
141 | 141 | $order_by .= (1 + $value['column']) . " ASC "; |
142 | 142 | break; |
143 | 143 | case 'desc': |
144 | 144 | $order_by .= (1 + $value['column']) . " DESC "; |
145 | 145 | break; |
146 | - } |
|
146 | + } |
|
147 | 147 | } |
148 | 148 | } else { |
149 | 149 | $order_by = " ORDER BY 1 ASC"; |
@@ -63,14 +63,14 @@ |
||
63 | 63 | if (strlen($match[1]) > strlen($match[2])) { |
64 | 64 | $match[2] = substr($match[1], 0, strlen($match[1]) - strlen($match[2])) . $match[2]; |
65 | 65 | } |
66 | - $ged_date = new Date("FROM {$cal} {$match[1]} TO {$cal} {$match[2]}"); |
|
66 | + $ged_date = new Date("from {$cal} {$match[1]} TO {$cal} {$match[2]}"); |
|
67 | 67 | $view = 'year'; |
68 | 68 | } else { |
69 | 69 | // advanced-year "decade/century wildcard" |
70 | 70 | if (preg_match('/^(\d+)(\?+)$/', $year, $match)) { |
71 | 71 | $y1 = $match[1] . str_replace('?', '0', $match[2]); |
72 | 72 | $y2 = $match[1] . str_replace('?', '9', $match[2]); |
73 | - $ged_date = new Date("FROM {$cal} {$y1} TO {$cal} {$y2}"); |
|
73 | + $ged_date = new Date("from {$cal} {$y1} TO {$cal} {$y2}"); |
|
74 | 74 | $view = 'year'; |
75 | 75 | } else { |
76 | 76 | if ($year < 0) { |
@@ -98,8 +98,11 @@ |
||
98 | 98 | <td class="col-xs-1"> |
99 | 99 | <?php if ($module instanceof ModuleConfigInterface): ?> |
100 | 100 | <a href="<?php echo $module->getConfigLink(); ?>"><?php echo $module->getTitle(); ?> <i class="fa fa-cogs"></i></a> |
101 | - <?php else: ?> |
|
102 | - <?php echo $module->getTitle(); ?> |
|
101 | + <?php else { |
|
102 | + : ?> |
|
103 | + <?php echo $module->getTitle(); |
|
104 | +} |
|
105 | +?> |
|
103 | 106 | <?php endif; ?> |
104 | 107 | </td> |
105 | 108 | <td class="col-xs-5"><?php echo $module->getDescription(); ?></td> |
@@ -625,8 +625,11 @@ discard block |
||
625 | 625 | <a href="admin_site_upgrade.php" class="error"> |
626 | 626 | <?php echo /* I18N: %s is a version number */ I18N::translate('Upgrade to webtrees %s.', Filter::escapeHtml($latest_version)); ?> |
627 | 627 | </a> |
628 | - <?php else: ?> |
|
629 | - <?php echo I18N::translate('This is the latest version of webtrees. No upgrade is available.'); ?> |
|
628 | + <?php else { |
|
629 | + : ?> |
|
630 | + <?php echo I18N::translate('This is the latest version of webtrees. No upgrade is available.'); |
|
631 | +} |
|
632 | +?> |
|
630 | 633 | <?php endif; ?> |
631 | 634 | </p> |
632 | 635 | <?php endif; ?> |
@@ -788,9 +791,12 @@ discard block |
||
788 | 791 | <?php echo I18N::number($changes[$tree->getTreeId()]); ?> |
789 | 792 | <span class="sr-only"><?php echo I18N::translate('Pending changes'); ?> <?php echo $tree->getTitleHtml(); ?></span> |
790 | 793 | </a> |
791 | - <?php else: ?> |
|
794 | + <?php else { |
|
795 | + : ?> |
|
792 | 796 | - |
793 | - <?php endif; ?> |
|
797 | + <?php endif; |
|
798 | +} |
|
799 | +?> |
|
794 | 800 | </td> |
795 | 801 | <td class="text-right flip"> |
796 | 802 | <?php if ($individuals[$tree->getTreeId()]): ?> |
@@ -798,9 +804,12 @@ discard block |
||
798 | 804 | <?php echo I18N::number($individuals[$tree->getTreeId()]); ?> |
799 | 805 | <span class="sr-only"><?php echo I18N::translate('Individuals'); ?> <?php echo $tree->getTitleHtml(); ?></span> |
800 | 806 | </a> |
801 | - <?php else: ?> |
|
807 | + <?php else { |
|
808 | + : ?> |
|
802 | 809 | - |
803 | - <?php endif; ?> |
|
810 | + <?php endif; |
|
811 | +} |
|
812 | +?> |
|
804 | 813 | </td> |
805 | 814 | <td class="text-right flip"> |
806 | 815 | <?php if ($families[$tree->getTreeId()]): ?> |
@@ -808,9 +817,12 @@ discard block |
||
808 | 817 | <?php echo I18N::number($families[$tree->getTreeId()]); ?> |
809 | 818 | <span class="sr-only"><?php echo I18N::translate('Families'); ?> <?php echo $tree->getTitleHtml(); ?></span> |
810 | 819 | </a> |
811 | - <?php else: ?> |
|
820 | + <?php else { |
|
821 | + : ?> |
|
812 | 822 | - |
813 | - <?php endif; ?> |
|
823 | + <?php endif; |
|
824 | +} |
|
825 | +?> |
|
814 | 826 | </td> |
815 | 827 | <td class="text-right flip"> |
816 | 828 | <?php if ($sources[$tree->getTreeId()]): ?> |
@@ -818,9 +830,12 @@ discard block |
||
818 | 830 | <?php echo I18N::number($sources[$tree->getTreeId()]); ?> |
819 | 831 | <span class="sr-only"><?php echo I18N::translate('Sources'); ?> <?php echo $tree->getTitleHtml(); ?></span> |
820 | 832 | </a> |
821 | - <?php else: ?> |
|
833 | + <?php else { |
|
834 | + : ?> |
|
822 | 835 | - |
823 | - <?php endif; ?> |
|
836 | + <?php endif; |
|
837 | +} |
|
838 | +?> |
|
824 | 839 | </td> |
825 | 840 | <td class="text-right flip"> |
826 | 841 | <?php if ($repositories[$tree->getTreeId()]): ?> |
@@ -828,9 +843,12 @@ discard block |
||
828 | 843 | <?php echo I18N::number($repositories[$tree->getTreeId()]); ?> |
829 | 844 | <span class="sr-only"><?php echo I18N::translate('Repositories'); ?> <?php echo $tree->getTitleHtml(); ?></span> |
830 | 845 | </a> |
831 | - <?php else: ?> |
|
846 | + <?php else { |
|
847 | + : ?> |
|
832 | 848 | - |
833 | - <?php endif; ?> |
|
849 | + <?php endif; |
|
850 | +} |
|
851 | +?> |
|
834 | 852 | </td> |
835 | 853 | <td class="text-right flip"> |
836 | 854 | <?php if ($media[$tree->getTreeId()]): ?> |
@@ -838,9 +856,12 @@ discard block |
||
838 | 856 | <?php echo I18N::number($media[$tree->getTreeId()]); ?> |
839 | 857 | <span class="sr-only"><?php echo I18N::translate('Media objects'); ?> <?php echo $tree->getTitleHtml(); ?></span> |
840 | 858 | </a> |
841 | - <?php else: ?> |
|
859 | + <?php else { |
|
860 | + : ?> |
|
842 | 861 | - |
843 | - <?php endif; ?> |
|
862 | + <?php endif; |
|
863 | +} |
|
864 | +?> |
|
844 | 865 | </td> |
845 | 866 | </tr> |
846 | 867 | <?php endforeach; ?> |
@@ -81,8 +81,11 @@ |
||
81 | 81 | <td class="col-xs-2"> |
82 | 82 | <?php if ($module instanceof ModuleConfigInterface): ?> |
83 | 83 | <a href="<?php echo $module->getConfigLink(); ?>"><?php echo $module->getTitle(); ?> <i class="fa fa-cogs"></i></a> |
84 | - <?php else: ?> |
|
85 | - <?php echo $module->getTitle(); ?> |
|
84 | + <?php else { |
|
85 | + : ?> |
|
86 | + <?php echo $module->getTitle(); |
|
87 | +} |
|
88 | +?> |
|
86 | 89 | <?php endif; ?> |
87 | 90 | </td> |
88 | 91 | <td class="col-xs-5"><?php echo $module->getDescription(); ?></td> |
@@ -217,7 +217,7 @@ |
||
217 | 217 | $father = $family->getHusband(); |
218 | 218 | $mother = $family->getWife(); |
219 | 219 | $html .= $this->getHTML($father) . |
220 | - $this->getHTML($mother); |
|
220 | + $this->getHTML($mother); |
|
221 | 221 | |
222 | 222 | // Can only have a step parent if one & only one parent found at this point |
223 | 223 | if ($father instanceof Individual xor $mother instanceof Individual) { |
@@ -147,8 +147,11 @@ discard block |
||
147 | 147 | <div class="font9"> |
148 | 148 | <?php echo $spouse->getLifeSpan(); ?> |
149 | 149 | </div> |
150 | - <?php else: ?> |
|
151 | - <?php echo $spouse->getFullName(); ?> |
|
150 | + <?php else { |
|
151 | + : ?> |
|
152 | + <?php echo $spouse->getFullName(); |
|
153 | +} |
|
154 | +?> |
|
152 | 155 | <?php endif; ?> |
153 | 156 | </td> |
154 | 157 | </tr> |
@@ -172,8 +175,11 @@ discard block |
||
172 | 175 | <div class="font9"> |
173 | 176 | <?php echo $child->getLifeSpan(); ?> |
174 | 177 | </div> |
175 | - <?php else: ?> |
|
176 | - <?php echo $child->getFullName(); ?> |
|
178 | + <?php else { |
|
179 | + : ?> |
|
180 | + <?php echo $child->getFullName(); |
|
181 | +} |
|
182 | +?> |
|
177 | 183 | <?php endif; ?> |
178 | 184 | </td> |
179 | 185 | </tr> |
@@ -241,12 +241,15 @@ discard block |
||
241 | 241 | <?php // Reset - otherwise we might "undo all changes", which refreshes the ?> |
242 | 242 | <?php // page, which makes them all again! ?> |
243 | 243 | <script>reset_reload();</script> |
244 | - <?php else: ?> |
|
244 | + <?php else { |
|
245 | + : ?> |
|
245 | 246 | <hr> |
246 | 247 | <div id="batch_update2" class="col-sm-12"> |
247 | 248 | <?php if ($this->curr_xref): ?> |
248 | 249 | <?php // Create an object, so we can get the latest version of the name. ?> |
249 | - <?php $this->record = GedcomRecord::getInstance($this->curr_xref, $WT_TREE); ?> |
|
250 | + <?php $this->record = GedcomRecord::getInstance($this->curr_xref, $WT_TREE); |
|
251 | +} |
|
252 | +?> |
|
250 | 253 | <div class="form-group"> |
251 | 254 | <?php echo self::createSubmitButton(I18N::translate('previous'), $this->prev_xref) ?> |
252 | 255 | <?php echo self::createSubmitButton(I18N::translate('next'), $this->next_xref) ?> |
@@ -258,8 +261,11 @@ discard block |
||
258 | 261 | <div class="form-group"> |
259 | 262 | <?php echo implode(' ', $this->PLUGIN->getActionButtons($this->curr_xref, $this->record)); ?> |
260 | 263 | </div> |
261 | - <?php else: ?> |
|
262 | - <div class="alert alert-info"><?php echo I18N::translate('Nothing found.'); ?></div> |
|
264 | + <?php else { |
|
265 | + : ?> |
|
266 | + <div class="alert alert-info"><?php echo I18N::translate('Nothing found.'); |
|
267 | +} |
|
268 | +?></div> |
|
263 | 269 | <?php endif; ?> |
264 | 270 | </div> |
265 | 271 | <?php endif; ?> |