@@ -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"; |
@@ -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> |
@@ -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> |
@@ -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; ?> |
@@ -403,8 +403,11 @@ |
||
403 | 403 | <a href="<?php echo $individual->getHtmlUrl(); ?>#stories"> |
404 | 404 | <?php echo $individual->getFullName(); ?> |
405 | 405 | </a> |
406 | - <?php else: ?> |
|
407 | - <?php echo $story->xref; ?> |
|
406 | + <?php else { |
|
407 | + : ?> |
|
408 | + <?php echo $story->xref; |
|
409 | +} |
|
410 | +?> |
|
408 | 411 | <?php endif; ?> |
409 | 412 | </td> |
410 | 413 | <td> |
@@ -110,10 +110,13 @@ |
||
110 | 110 | </option> |
111 | 111 | </select> |
112 | 112 | </td> |
113 | - <?php else: ?> |
|
113 | + <?php else { |
|
114 | + : ?> |
|
114 | 115 | <td class="descriptionbox wrap"></td> |
115 | 116 | <td class="optionbox wrap"></td> |
116 | - <?php endif; ?> |
|
117 | + <?php endif; |
|
118 | +} |
|
119 | +?> |
|
117 | 120 | </tr> |
118 | 121 | <tr> |
119 | 122 | <td class="descriptionbox wrap"> |
@@ -137,25 +137,25 @@ |
||
137 | 137 | } |
138 | 138 | |
139 | 139 | switch (Filter::get('action')) { |
140 | - case 'site': |
|
141 | - $controller->setPageTitle(I18N::translate('Website preferences')); |
|
142 | - break; |
|
143 | - case 'email': |
|
144 | - $controller->setPageTitle(I18N::translate('Sending email')); |
|
145 | - break; |
|
146 | - case 'login': |
|
147 | - $controller->setPageTitle(I18N::translate('Sign-in and registration')); |
|
148 | - break; |
|
149 | - case 'tracking': |
|
150 | - $controller->setPageTitle(/* I18N: e.g. http://www.google.com/analytics */ I18N::translate('Tracking and analytics')); |
|
151 | - break; |
|
152 | - case 'languages': |
|
153 | - $controller->setPageTitle(I18N::translate('Languages')); |
|
154 | - break; |
|
155 | - default: |
|
156 | - header('Location: ' . WT_BASE_URL . 'admin.php'); |
|
157 | - |
|
158 | - return; |
|
140 | + case 'site': |
|
141 | + $controller->setPageTitle(I18N::translate('Website preferences')); |
|
142 | + break; |
|
143 | + case 'email': |
|
144 | + $controller->setPageTitle(I18N::translate('Sending email')); |
|
145 | + break; |
|
146 | + case 'login': |
|
147 | + $controller->setPageTitle(I18N::translate('Sign-in and registration')); |
|
148 | + break; |
|
149 | + case 'tracking': |
|
150 | + $controller->setPageTitle(/* I18N: e.g. http://www.google.com/analytics */ I18N::translate('Tracking and analytics')); |
|
151 | + break; |
|
152 | + case 'languages': |
|
153 | + $controller->setPageTitle(I18N::translate('Languages')); |
|
154 | + break; |
|
155 | + default: |
|
156 | + header('Location: ' . WT_BASE_URL . 'admin.php'); |
|
157 | + |
|
158 | + return; |
|
159 | 159 | } |
160 | 160 | |
161 | 161 | $controller->pageHeader(); |