Passed
Push — 1.7 ( e46e7d...c17e55 )
by Greg
14:32 queued 07:46
created
edituser.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -183,8 +183,11 @@
 block discarded – undo
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.'); ?>
Please login to merge, or discard this patch.
admin_trees_config.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -551,18 +551,24 @@
 block discarded – undo
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>
Please login to merge, or discard this patch.
admin_site_logs.php 1 patch
Switch Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -98,52 +98,52 @@
 block discarded – undo
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";
Please login to merge, or discard this patch.
calendar.php 1 patch
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,14 +63,14 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
admin_module_menus.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,8 +98,11 @@
 block discarded – undo
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>
Please login to merge, or discard this patch.
admin_module_blocks.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,8 +81,11 @@
 block discarded – undo
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>
Please login to merge, or discard this patch.
app/Module/FamilyNavigatorModule.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -217,7 +217,7 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -147,8 +147,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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>
Please login to merge, or discard this patch.
app/Module/BatchUpdateModule.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -241,12 +241,15 @@  discard block
 block discarded – undo
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
 block discarded – undo
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; ?>
Please login to merge, or discard this patch.
app/Module/StoriesModule.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -403,8 +403,11 @@
 block discarded – undo
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>
Please login to merge, or discard this patch.