@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | */ |
36 | 36 | class PedigreeMapModule extends AbstractModule implements ModuleChartInterface |
37 | 37 | { |
38 | - const LINE_COLORS = [ |
|
38 | + const LINE_COLORS = [ |
|
39 | 39 | '#FF0000', |
40 | 40 | // Red |
41 | 41 | '#00FF00', |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | $color = self::LINE_COLORS[log($id, 2) % $color_count]; |
141 | 141 | $icon['color'] = $color; //make icon color the same as the line |
142 | 142 | $sosa_points[$id] = $event->getLatLonJSArray(); |
143 | - $sosa_parent = (int)floor($id / 2); |
|
143 | + $sosa_parent = (int) floor($id / 2); |
|
144 | 144 | if (array_key_exists($sosa_parent, $sosa_points)) { |
145 | 145 | // Would like to use a GeometryCollection to hold LineStrings |
146 | 146 | // rather than generate polylines but the MarkerCluster library |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | 'icon' => $icon, |
169 | 169 | 'tooltip' => $event->toolTip(), |
170 | 170 | 'summary' => view('modules/pedigree-map/event-sidebar', $event->shortSummary('pedigree', $id)), |
171 | - 'zoom' => (int)$event->getZoom(), |
|
171 | + 'zoom' => (int) $event->getZoom(), |
|
172 | 172 | ], |
173 | 173 | ]; |
174 | 174 | } |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | { |
189 | 189 | $xref = $request->get('reference'); |
190 | 190 | $individual = Individual::getInstance($xref, $tree); |
191 | - $generations = (int)$request->get( |
|
191 | + $generations = (int) $request->get( |
|
192 | 192 | 'generations', |
193 | 193 | $tree->getPreference('DEFAULT_PEDIGREE_GENERATIONS') |
194 | 194 | ); |
@@ -241,14 +241,14 @@ discard block |
||
241 | 241 | function ($item) { |
242 | 242 | return preg_replace('/[^a-z\d]/i', '', strtolower($item)); |
243 | 243 | }, |
244 | - (array)$provider->styles |
|
244 | + (array) $provider->styles |
|
245 | 245 | ); |
246 | 246 | |
247 | - $key = preg_replace('/[^a-z\d]/i', '', strtolower((string)$provider->name)); |
|
247 | + $key = preg_replace('/[^a-z\d]/i', '', strtolower((string) $provider->name)); |
|
248 | 248 | |
249 | 249 | self::$map_providers[$key] = [ |
250 | - 'name' => (string)$provider->name, |
|
251 | - 'styles' => array_combine($style_keys, (array)$provider->styles), |
|
250 | + 'name' => (string) $provider->name, |
|
251 | + 'styles' => array_combine($style_keys, (array) $provider->styles), |
|
252 | 252 | ]; |
253 | 253 | } |
254 | 254 | } catch (Exception $ex) { |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | 'provider' => 'openstreetmap', |
258 | 258 | 'style' => 'mapnik', |
259 | 259 | ]; |
260 | - self::$map_providers = [ |
|
260 | + self::$map_providers = [ |
|
261 | 261 | 'openstreetmap' => [ |
262 | 262 | 'name' => 'OpenStreetMap', |
263 | 263 | 'styles' => ['mapnik' => 'Mapnik'], |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | throw new IndividualAccessDeniedException(); |
319 | 319 | } |
320 | 320 | |
321 | - return (object)[ |
|
321 | + return (object) [ |
|
322 | 322 | 'name' => 'modules/pedigree-map/pedigree-map-page', |
323 | 323 | 'data' => [ |
324 | 324 | 'module' => $this->getName(), |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $input['control'] = FunctionsEdit::formControlSource($tree, $source, $attributes + ['required' => 'true']); |
116 | 116 | break; |
117 | 117 | case 'DATE': |
118 | - $attributes += [ |
|
118 | + $attributes += [ |
|
119 | 119 | 'type' => 'text', |
120 | 120 | 'value' => $input['default'], |
121 | 121 | ]; |
@@ -129,16 +129,16 @@ discard block |
||
129 | 129 | default: |
130 | 130 | switch ($input['type']) { |
131 | 131 | case 'text': |
132 | - $attributes += [ |
|
132 | + $attributes += [ |
|
133 | 133 | 'type' => 'text', |
134 | 134 | 'value' => $input['default'], |
135 | 135 | ]; |
136 | 136 | $input['control'] = '<input ' . Html::attributes($attributes) . '>'; |
137 | 137 | break; |
138 | 138 | case 'checkbox': |
139 | - $attributes += [ |
|
139 | + $attributes += [ |
|
140 | 140 | 'type' => 'checkbox', |
141 | - 'checked' => (bool)$input['default'], |
|
141 | + 'checked' => (bool) $input['default'], |
|
142 | 142 | ]; |
143 | 143 | $input['control'] = '<input ' . Html::attributes($attributes) . '>'; |
144 | 144 | break; |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | public function reorderChildrenAction(Request $request, Tree $tree): Response |
63 | 63 | { |
64 | 64 | $xref = $request->get('xref'); |
65 | - $order = (array)$request->get('order', []); |
|
65 | + $order = (array) $request->get('order', []); |
|
66 | 66 | $family = Family::getInstance($xref, $tree); |
67 | 67 | |
68 | 68 | $this->checkFamilyAccess($family, true); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $this->checkFamilyAccess($family, true); |
139 | 139 | |
140 | 140 | $PEDI = $request->get('PEDI', ''); |
141 | - $keep_chan = (bool)$request->get('keep_chan'); |
|
141 | + $keep_chan = (bool) $request->get('keep_chan'); |
|
142 | 142 | |
143 | 143 | $this->glevels = $request->get('glevels', []); |
144 | 144 | $this->tag = $request->get('tag', []); |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | } |
156 | 156 | } |
157 | 157 | $gedrec .= "\n" . GedcomCodePedi::createNewFamcPedi($PEDI, $xref); |
158 | - if ((bool)$request->get('SOUR_INDI')) { |
|
158 | + if ((bool) $request->get('SOUR_INDI')) { |
|
159 | 159 | $gedrec = $this->handleUpdates($gedrec); |
160 | 160 | } else { |
161 | 161 | $gedrec = $this->updateRest($gedrec); |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | } |
254 | 254 | } |
255 | 255 | |
256 | - if ((bool)$request->get('SOUR_INDI')) { |
|
256 | + if ((bool) $request->get('SOUR_INDI')) { |
|
257 | 257 | $gedrec = $this->handleUpdates($gedrec); |
258 | 258 | } else { |
259 | 259 | $gedrec = $this->updateRest($gedrec); |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | $famrec .= $this->addNewFact($request, $tree, $match); |
274 | 274 | } |
275 | 275 | } |
276 | - if ((bool)$request->get('SOUR_FAM')) { |
|
276 | + if ((bool) $request->get('SOUR_FAM')) { |
|
277 | 277 | $famrec = $this->handleUpdates($famrec); |
278 | 278 | } else { |
279 | 279 | $famrec = $this->updateRest($famrec); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | */ |
48 | 48 | public function treePageBlockEdit(Request $request, Tree $tree, User $user): Response |
49 | 49 | { |
50 | - $block_id = (int)$request->get('block_id'); |
|
50 | + $block_id = (int) $request->get('block_id'); |
|
51 | 51 | $block = $this->treeBlock($request, $user); |
52 | 52 | $title = $block->getTitle() . ' — ' . I18N::translate('Preferences'); |
53 | 53 | |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | */ |
90 | 90 | private function treeBlock(Request $request, User $user): ModuleBlockInterface |
91 | 91 | { |
92 | - $block_id = (int)$request->get('block_id'); |
|
92 | + $block_id = (int) $request->get('block_id'); |
|
93 | 93 | |
94 | 94 | $block_info = Database::prepare( |
95 | 95 | "SELECT module_Name, user_id FROM `##block` WHERE block_id = :block_id" |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | */ |
126 | 126 | public function userPageBlockEdit(Request $request, Tree $tree, User $user): Response |
127 | 127 | { |
128 | - $block_id = (int)$request->get('block_id'); |
|
128 | + $block_id = (int) $request->get('block_id'); |
|
129 | 129 | $block = $this->userBlock($request, $user); |
130 | 130 | $title = $block->getTitle() . ' — ' . I18N::translate('Preferences'); |
131 | 131 | |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | */ |
168 | 168 | private function userBlock(Request $request, User $user): ModuleBlockInterface |
169 | 169 | { |
170 | - $block_id = (int)$request->get('block_id'); |
|
170 | + $block_id = (int) $request->get('block_id'); |
|
171 | 171 | |
172 | 172 | $block_info = Database::prepare( |
173 | 173 | "SELECT module_Name, user_id FROM `##block` WHERE block_id = :block_id" |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | throw new NotFoundHttpException($block_info->module_name . ' is not a block'); |
186 | 186 | } |
187 | 187 | |
188 | - $block_owner_id = (int)$block_info->user_id; |
|
188 | + $block_owner_id = (int) $block_info->user_id; |
|
189 | 189 | |
190 | 190 | if ($block_owner_id !== $user->getUserId() && !Auth::isAdmin()) { |
191 | 191 | throw new AccessDeniedHttpException('You are not allowed to edit this block'); |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | */ |
232 | 232 | public function treePageBlock(Request $request, Tree $tree): Response |
233 | 233 | { |
234 | - $block_id = (int)$request->get('block_id'); |
|
234 | + $block_id = (int) $request->get('block_id'); |
|
235 | 235 | |
236 | 236 | $block = Database::prepare( |
237 | 237 | "SELECT * FROM `##block` WHERE block_id = :block_id AND gedcom_id = :tree_id AND user_id IS NULL" |
@@ -297,8 +297,8 @@ discard block |
||
297 | 297 | */ |
298 | 298 | public function treePageDefaultUpdate(Request $request): RedirectResponse |
299 | 299 | { |
300 | - $main_blocks = (array)$request->get('main'); |
|
301 | - $side_blocks = (array)$request->get('side'); |
|
300 | + $main_blocks = (array) $request->get('main'); |
|
301 | + $side_blocks = (array) $request->get('side'); |
|
302 | 302 | |
303 | 303 | $this->updateTreeBlocks(-1, $main_blocks, $side_blocks); |
304 | 304 | |
@@ -342,14 +342,14 @@ discard block |
||
342 | 342 | */ |
343 | 343 | public function treePageUpdate(Request $request, Tree $tree): RedirectResponse |
344 | 344 | { |
345 | - $defaults = (bool)$request->get('defaults'); |
|
345 | + $defaults = (bool) $request->get('defaults'); |
|
346 | 346 | |
347 | 347 | if ($defaults) { |
348 | 348 | $main_blocks = $this->getBlocksForTreePage(-1, AUth::PRIV_NONE, 'main'); |
349 | 349 | $side_blocks = $this->getBlocksForTreePage(-1, Auth::PRIV_NONE, 'side'); |
350 | 350 | } else { |
351 | - $main_blocks = (array)$request->get('main'); |
|
352 | - $side_blocks = (array)$request->get('side'); |
|
351 | + $main_blocks = (array) $request->get('main'); |
|
352 | + $side_blocks = (array) $request->get('side'); |
|
353 | 353 | } |
354 | 354 | |
355 | 355 | $this->updateTreeBlocks($tree->getTreeId(), $main_blocks, $side_blocks); |
@@ -396,7 +396,7 @@ discard block |
||
396 | 396 | */ |
397 | 397 | public function userPageBlock(Request $request, Tree $tree, User $user): Response |
398 | 398 | { |
399 | - $block_id = (int)$request->get('block_id'); |
|
399 | + $block_id = (int) $request->get('block_id'); |
|
400 | 400 | |
401 | 401 | $block = Database::prepare( |
402 | 402 | "SELECT * FROM `##block` WHERE block_id = :block_id AND gedcom_id IS NULL AND user_id = :user_id" |
@@ -461,8 +461,8 @@ discard block |
||
461 | 461 | */ |
462 | 462 | public function userPageDefaultUpdate(Request $request): RedirectResponse |
463 | 463 | { |
464 | - $main_blocks = (array)$request->get('main'); |
|
465 | - $side_blocks = (array)$request->get('side'); |
|
464 | + $main_blocks = (array) $request->get('main'); |
|
465 | + $side_blocks = (array) $request->get('side'); |
|
466 | 466 | |
467 | 467 | $this->updateUserBlocks(-1, $main_blocks, $side_blocks); |
468 | 468 | |
@@ -508,14 +508,14 @@ discard block |
||
508 | 508 | */ |
509 | 509 | public function userPageUpdate(Request $request, Tree $tree, User $user): RedirectResponse |
510 | 510 | { |
511 | - $defaults = (bool)$request->get('defaults'); |
|
511 | + $defaults = (bool) $request->get('defaults'); |
|
512 | 512 | |
513 | 513 | if ($defaults) { |
514 | 514 | $main_blocks = $this->getBlocksForUserPage(-1, -1, AUth::PRIV_NONE, 'main'); |
515 | 515 | $side_blocks = $this->getBlocksForUserPage(-1, -1, Auth::PRIV_NONE, 'side'); |
516 | 516 | } else { |
517 | - $main_blocks = (array)$request->get('main'); |
|
518 | - $side_blocks = (array)$request->get('side'); |
|
517 | + $main_blocks = (array) $request->get('main'); |
|
518 | + $side_blocks = (array) $request->get('side'); |
|
519 | 519 | } |
520 | 520 | |
521 | 521 | $this->updateUserBlocks($user->getUserId(), $main_blocks, $side_blocks); |
@@ -532,7 +532,7 @@ discard block |
||
532 | 532 | */ |
533 | 533 | public function userPageUserEdit(Request $request): Response |
534 | 534 | { |
535 | - $user_id = (int)$request->get('user_id'); |
|
535 | + $user_id = (int) $request->get('user_id'); |
|
536 | 536 | $user = User::find($user_id); |
537 | 537 | $main_blocks = $this->getBlocksForUserPage(-1, $user_id, Auth::PRIV_NONE, 'main'); |
538 | 538 | $side_blocks = $this->getBlocksForUserPage(-1, $user_id, Auth::PRIV_NONE, 'side'); |
@@ -561,9 +561,9 @@ discard block |
||
561 | 561 | */ |
562 | 562 | public function userPageUserUpdate(Request $request): RedirectResponse |
563 | 563 | { |
564 | - $user_id = (int)$request->get('user_id'); |
|
565 | - $main_blocks = (array)$request->get('main'); |
|
566 | - $side_blocks = (array)$request->get('side'); |
|
564 | + $user_id = (int) $request->get('user_id'); |
|
565 | + $main_blocks = (array) $request->get('main'); |
|
566 | + $side_blocks = (array) $request->get('side'); |
|
567 | 567 | |
568 | 568 | $this->updateUserBlocks($user_id, $main_blocks, $side_blocks); |
569 | 569 |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | public function reorderMediaAction(Request $request, Tree $tree): Response |
63 | 63 | { |
64 | 64 | $xref = $request->get('xref'); |
65 | - $order = (array)$request->get('order', []); |
|
65 | + $order = (array) $request->get('order', []); |
|
66 | 66 | $individual = Individual::getInstance($xref, $tree); |
67 | 67 | |
68 | 68 | $this->checkIndividualAccess($individual, true); |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | public function reorderNamesAction(Request $request, Tree $tree): Response |
124 | 124 | { |
125 | 125 | $xref = $request->get('xref'); |
126 | - $order = (array)$request->get('order', []); |
|
126 | + $order = (array) $request->get('order', []); |
|
127 | 127 | $individual = Individual::getInstance($xref, $tree); |
128 | 128 | |
129 | 129 | $this->checkIndividualAccess($individual, true); |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | public function reorderSpousesAction(Request $request, Tree $tree): Response |
185 | 185 | { |
186 | 186 | $xref = $request->get('xref'); |
187 | - $order = (array)$request->get('order', []); |
|
187 | + $order = (array) $request->get('order', []); |
|
188 | 188 | $individual = Individual::getInstance($xref, $tree); |
189 | 189 | |
190 | 190 | $this->checkIndividualAccess($individual, true); |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | $gedcom .= $this->addNewFact($request, $tree, $match); |
292 | 292 | } |
293 | 293 | } |
294 | - if ((bool)$request->get('SOUR_INDI')) { |
|
294 | + if ((bool) $request->get('SOUR_INDI')) { |
|
295 | 295 | $gedcom = $this->handleUpdates($gedcom); |
296 | 296 | } else { |
297 | 297 | $gedcom = $this->updateRest($gedcom); |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | $gedcom .= $this->addNewFact($request, $tree, $match); |
384 | 384 | } |
385 | 385 | } |
386 | - if ((bool)$request->get('SOUR_INDI')) { |
|
386 | + if ((bool) $request->get('SOUR_INDI')) { |
|
387 | 387 | $gedcom = $this->handleUpdates($gedcom); |
388 | 388 | } else { |
389 | 389 | $gedcom = $this->updateRest($gedcom); |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | */ |
417 | 417 | public function addSpouse(Request $request, Tree $tree): Response |
418 | 418 | { |
419 | - $xref = $request->get('xref', ''); |
|
419 | + $xref = $request->get('xref', ''); |
|
420 | 420 | |
421 | 421 | $individual = Individual::getInstance($xref, $tree); |
422 | 422 | |
@@ -474,7 +474,7 @@ discard block |
||
474 | 474 | $indi_gedcom .= $this->addNewFact($request, $tree, $match); |
475 | 475 | } |
476 | 476 | } |
477 | - if ((bool)$request->get('SOUR_INDI')) { |
|
477 | + if ((bool) $request->get('SOUR_INDI')) { |
|
478 | 478 | $indi_gedcom = $this->handleUpdates($indi_gedcom); |
479 | 479 | } else { |
480 | 480 | $indi_gedcom = $this->updateRest($indi_gedcom); |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | $fam_gedcom .= $this->addNewFact($request, $tree, $match); |
487 | 487 | } |
488 | 488 | } |
489 | - if ((bool)$request->get('SOUR_FAM')) { |
|
489 | + if ((bool) $request->get('SOUR_FAM')) { |
|
490 | 490 | $fam_gedcom = $this->handleUpdates($fam_gedcom); |
491 | 491 | } else { |
492 | 492 | $fam_gedcom = $this->updateRest($fam_gedcom); |
@@ -560,7 +560,7 @@ discard block |
||
560 | 560 | $gedrec .= $this->addNewFact($request, $tree, $match); |
561 | 561 | } |
562 | 562 | } |
563 | - if ((bool)$request->get('SOUR_INDI')) { |
|
563 | + if ((bool) $request->get('SOUR_INDI')) { |
|
564 | 564 | $gedrec = $this->handleUpdates($gedrec); |
565 | 565 | } else { |
566 | 566 | $gedrec = $this->updateRest($gedrec); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | $calendar_service = new CalendarService(); |
70 | 70 | |
71 | - $days = (int)$this->getBlockSetting($block_id, 'days', self::DEFAULT_DAYS); |
|
71 | + $days = (int) $this->getBlockSetting($block_id, 'days', self::DEFAULT_DAYS); |
|
72 | 72 | $infoStyle = $this->getBlockSetting($block_id, 'infoStyle', self::DEFAULT_STYLE); |
73 | 73 | $calendar = $this->getBlockSetting($block_id, 'calendar', self::DEFAULT_CALENDAR); |
74 | 74 | |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | } |
123 | 123 | $yahrzeit_date = new Date($yahrzeit_date->format('%@ %A %O %E')); |
124 | 124 | |
125 | - $yahrzeits[] = (object)[ |
|
125 | + $yahrzeits[] = (object) [ |
|
126 | 126 | 'individual' => $fact->getParent(), |
127 | 127 | 'fact_date' => $fact->getDate(), |
128 | 128 | 'fact' => $fact, |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $default_events = implode(',', self::DEFAULT_EVENTS); |
119 | 119 | |
120 | 120 | $days = $this->getBlockSetting($block_id, 'days', self::DEFAULT_DAYS); |
121 | - $filter = (bool)$this->getBlockSetting($block_id, 'filter', self::DEFAULT_FILTER); |
|
121 | + $filter = (bool) $this->getBlockSetting($block_id, 'filter', self::DEFAULT_FILTER); |
|
122 | 122 | $infoStyle = $this->getBlockSetting($block_id, 'infoStyle', self::DEFAULT_STYLE); |
123 | 123 | $sortStyle = $this->getBlockSetting($block_id, 'sortStyle', self::DEFAULT_SORT); |
124 | 124 | $events = $this->getBlockSetting($block_id, 'events', $default_events); |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $events_filter = implode('|', $event_array); |
137 | 137 | |
138 | 138 | $startjd = WT_CLIENT_JD + 1; |
139 | - $endjd = WT_CLIENT_JD + (int)$days; |
|
139 | + $endjd = WT_CLIENT_JD + (int) $days; |
|
140 | 140 | |
141 | 141 | $facts = $calendar_service->getEventsList($startjd, $endjd, $events_filter, $filter, $sortStyle, $tree); |
142 | 142 |
@@ -294,7 +294,7 @@ |
||
294 | 294 | public static function getAll(): array |
295 | 295 | { |
296 | 296 | if (empty(self::$trees)) { |
297 | - $rows = Database::prepare( |
|
297 | + $rows = Database::prepare( |
|
298 | 298 | "SELECT g.gedcom_id AS tree_id, g.gedcom_name AS tree_name, gs1.setting_value AS tree_title" . |
299 | 299 | " FROM `##gedcom` g" . |
300 | 300 | " LEFT JOIN `##gedcom_setting` gs1 ON (g.gedcom_id=gs1.gedcom_id AND gs1.setting_name='title')" . |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | "SELECT DISTINCT f_id AS xref, f_gedcom AS gedcom, d_type, d_day, d_month, d_year, d_fact" . |
184 | 184 | " FROM `##dates` JOIN `##families` ON d_gid = f_id AND d_file = f_file" . |
185 | 185 | " WHERE d_type = :type AND d_file = :tree_id"; |
186 | - $args = [ |
|
186 | + $args = [ |
|
187 | 187 | 'type' => $anniv->format('%@'), |
188 | 188 | 'tree_id' => $tree->getTreeId(), |
189 | 189 | ]; |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | $where .= " AND d_day = :day"; |
214 | 214 | $args['day'] = $anniv->d; |
215 | 215 | } |
216 | - $where .= " AND d_mon = :month"; |
|
216 | + $where .= " AND d_mon = :month"; |
|
217 | 217 | $args['month'] = $anniv->m; |
218 | 218 | } else { |
219 | 219 | // SPECIAL CASES: |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | } elseif ($anniv->d === 29 && $anniv->daysInMonth() === 29) { |
228 | 228 | $where .= " AND (d_day = 29 OR d_day > 30) AND d_mon = 2"; |
229 | 229 | } else { |
230 | - $where .= " AND d_day = :day AND d_mon = 2"; |
|
230 | + $where .= " AND d_day = :day AND d_mon = 2"; |
|
231 | 231 | $args['day'] = $anniv->d; |
232 | 232 | } |
233 | 233 | break; |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | } elseif ($anniv->d == 29 && $anniv->daysInMonth() === 29) { |
251 | 251 | $where .= " AND (d_day = 29 OR d_day > 30) AND d_mon = 3"; |
252 | 252 | } else { |
253 | - $where .= " AND d_day = :day AND d_mon = 3"; |
|
253 | + $where .= " AND d_day = :day AND d_mon = 3"; |
|
254 | 254 | $args['day'] = $anniv->d; |
255 | 255 | } |
256 | 256 | break; |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | } |
306 | 306 | } |
307 | 307 | // Only events in the past (includes dates without a year) |
308 | - $where .= " AND d_year <= :year"; |
|
308 | + $where .= " AND d_year <= :year"; |
|
309 | 309 | $args['year'] = $anniv->y; |
310 | 310 | |
311 | 311 | if ($facts) { |