@@ -193,7 +193,7 @@ |
||
| 193 | 193 | |
| 194 | 194 | // Username already exists |
| 195 | 195 | if (User::findByUserName($username) !== null) { |
| 196 | - throw new Exception(I18N::translate('Duplicate username. A user with that username already exists. Please choose another username.'.$username)); |
|
| 196 | + throw new Exception(I18N::translate('Duplicate username. A user with that username already exists. Please choose another username.' . $username)); |
|
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | // Email already exists |
@@ -975,8 +975,8 @@ |
||
| 975 | 975 | // For backwards compatibility with webtrees 1.x we store the two calendar formats in one variable |
| 976 | 976 | // e.g. "gregorian_and_jewish" |
| 977 | 977 | $tree->setPreference('CALENDAR_FORMAT', implode('_and_', array_unique([ |
| 978 | - $request->get('CALENDAR_FORMAT0', 'none'), |
|
| 979 | - $request->get('CALENDAR_FORMAT1', 'none'), |
|
| 978 | + $request->get('CALENDAR_FORMAT0', 'none'), |
|
| 979 | + $request->get('CALENDAR_FORMAT1', 'none'), |
|
| 980 | 980 | ]))); |
| 981 | 981 | $tree->setPreference('CHART_BOX_TAGS', implode(',', $request->get('CHART_BOX_TAGS', []))); |
| 982 | 982 | $tree->setPreference('CONTACT_USER_ID', $request->get('CONTACT_USER_ID')); |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | <select name="tree_name" class="form-control" id="import-server-file"> |
| 47 | 47 | <option value=""></option> |
| 48 | 48 | <?php foreach ($gedcom_files as $gedcom_file): ?> |
| 49 | - <option value="<?= e($gedcom_file) ?>" <?= $gedcom_file === $default_gedcom_file? 'selected' : '' ?>> |
|
| 49 | + <option value="<?= e($gedcom_file) ?>" <?= $gedcom_file === $default_gedcom_file ? 'selected' : '' ?>> |
|
| 50 | 50 | <?= e($gedcom_file) ?> |
| 51 | 51 | </option> |
| 52 | 52 | <?php endforeach ?> |
@@ -1604,7 +1604,7 @@ |
||
| 1604 | 1604 | $height = (int) $attrs['height']; |
| 1605 | 1605 | } |
| 1606 | 1606 | |
| 1607 | - $person = Individual::getInstance($id, $this->tree); |
|
| 1607 | + $person = Individual::getInstance($id, $this->tree); |
|
| 1608 | 1608 | $media_file = $person->findHighlightedMediaFile(); |
| 1609 | 1609 | |
| 1610 | 1610 | if ($media_file !== null && $media_file->fileExists()) { |
@@ -255,35 +255,35 @@ discard block |
||
| 255 | 255 | |
| 256 | 256 | $args = []; |
| 257 | 257 | if ($search) { |
| 258 | - $sql .= " AND log_message LIKE CONCAT('%', :search, '%')"; |
|
| 258 | + $sql .= " AND log_message LIKE CONCAT('%', :search, '%')"; |
|
| 259 | 259 | $args['search'] = $search; |
| 260 | 260 | } |
| 261 | 261 | if ($from) { |
| 262 | - $sql .= " AND log_time >= :from"; |
|
| 262 | + $sql .= " AND log_time >= :from"; |
|
| 263 | 263 | $args['from'] = $from; |
| 264 | 264 | } |
| 265 | 265 | if ($to) { |
| 266 | - $sql .= " AND log_time < TIMESTAMPADD(DAY, 1 , :to)"; // before end of the day |
|
| 266 | + $sql .= " AND log_time < TIMESTAMPADD(DAY, 1 , :to)"; // before end of the day |
|
| 267 | 267 | $args['to'] = $to; |
| 268 | 268 | } |
| 269 | 269 | if ($type) { |
| 270 | - $sql .= " AND log_type = :type"; |
|
| 270 | + $sql .= " AND log_type = :type"; |
|
| 271 | 271 | $args['type'] = $type; |
| 272 | 272 | } |
| 273 | 273 | if ($text) { |
| 274 | - $sql .= " AND log_message LIKE CONCAT('%', :text, '%')"; |
|
| 274 | + $sql .= " AND log_message LIKE CONCAT('%', :text, '%')"; |
|
| 275 | 275 | $args['text'] = $text; |
| 276 | 276 | } |
| 277 | 277 | if ($ip) { |
| 278 | - $sql .= " AND ip_address LIKE CONCAT('%', :ip, '%')"; |
|
| 278 | + $sql .= " AND ip_address LIKE CONCAT('%', :ip, '%')"; |
|
| 279 | 279 | $args['ip'] = $ip; |
| 280 | 280 | } |
| 281 | 281 | if ($username) { |
| 282 | - $sql .= " AND user_name LIKE CONCAT('%', :user, '%')"; |
|
| 282 | + $sql .= " AND user_name LIKE CONCAT('%', :user, '%')"; |
|
| 283 | 283 | $args['user'] = $username; |
| 284 | 284 | } |
| 285 | 285 | if ($gedc) { |
| 286 | - $sql .= " AND gedcom_name = :gedc"; |
|
| 286 | + $sql .= " AND gedcom_name = :gedc"; |
|
| 287 | 287 | $args['gedc'] = $gedc; |
| 288 | 288 | } |
| 289 | 289 | |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | } |
| 310 | 310 | |
| 311 | 311 | if ($length) { |
| 312 | - $sql .= " LIMIT :limit OFFSET :offset"; |
|
| 312 | + $sql .= " LIMIT :limit OFFSET :offset"; |
|
| 313 | 313 | $args['limit'] = $length; |
| 314 | 314 | $args['offset'] = $start; |
| 315 | 315 | } |
@@ -361,35 +361,35 @@ discard block |
||
| 361 | 361 | |
| 362 | 362 | $args = []; |
| 363 | 363 | if ($search) { |
| 364 | - $sql .= " AND log_message LIKE CONCAT('%', :search, '%')"; |
|
| 364 | + $sql .= " AND log_message LIKE CONCAT('%', :search, '%')"; |
|
| 365 | 365 | $args['search'] = $search; |
| 366 | 366 | } |
| 367 | 367 | if ($from) { |
| 368 | - $sql .= " AND log_time >= :from"; |
|
| 368 | + $sql .= " AND log_time >= :from"; |
|
| 369 | 369 | $args['from'] = $from; |
| 370 | 370 | } |
| 371 | 371 | if ($to) { |
| 372 | - $sql .= " AND log_time < TIMESTAMPADD(DAY, 1 , :to)"; // before end of the day |
|
| 372 | + $sql .= " AND log_time < TIMESTAMPADD(DAY, 1 , :to)"; // before end of the day |
|
| 373 | 373 | $args['to'] = $to; |
| 374 | 374 | } |
| 375 | 375 | if ($type) { |
| 376 | - $sql .= " AND log_type = :type"; |
|
| 376 | + $sql .= " AND log_type = :type"; |
|
| 377 | 377 | $args['type'] = $type; |
| 378 | 378 | } |
| 379 | 379 | if ($text) { |
| 380 | - $sql .= " AND log_message LIKE CONCAT('%', :text, '%')"; |
|
| 380 | + $sql .= " AND log_message LIKE CONCAT('%', :text, '%')"; |
|
| 381 | 381 | $args['text'] = $text; |
| 382 | 382 | } |
| 383 | 383 | if ($ip) { |
| 384 | - $sql .= " AND ip_address LIKE CONCAT('%', :ip, '%')"; |
|
| 384 | + $sql .= " AND ip_address LIKE CONCAT('%', :ip, '%')"; |
|
| 385 | 385 | $args['ip'] = $ip; |
| 386 | 386 | } |
| 387 | 387 | if ($username) { |
| 388 | - $sql .= " AND user_name LIKE CONCAT('%', :user, '%')"; |
|
| 388 | + $sql .= " AND user_name LIKE CONCAT('%', :user, '%')"; |
|
| 389 | 389 | $args['user'] = $username; |
| 390 | 390 | } |
| 391 | 391 | if ($gedc) { |
| 392 | - $sql .= " AND gedcom_name = :gedc"; |
|
| 392 | + $sql .= " AND gedcom_name = :gedc"; |
|
| 393 | 393 | $args['gedc'] = $gedc; |
| 394 | 394 | } |
| 395 | 395 | |
@@ -421,37 +421,37 @@ discard block |
||
| 421 | 421 | |
| 422 | 422 | $args = []; |
| 423 | 423 | if ($from) { |
| 424 | - $sql .= " AND log_time >= :from"; |
|
| 424 | + $sql .= " AND log_time >= :from"; |
|
| 425 | 425 | $args['from'] = $from; |
| 426 | 426 | } |
| 427 | 427 | if ($to) { |
| 428 | - $sql .= " AND log_time < TIMESTAMPADD(DAY, 1 , :to)"; // before end of the day |
|
| 428 | + $sql .= " AND log_time < TIMESTAMPADD(DAY, 1 , :to)"; // before end of the day |
|
| 429 | 429 | $args['to'] = $to; |
| 430 | 430 | } |
| 431 | 431 | if ($type) { |
| 432 | - $sql .= " AND log_type = :type"; |
|
| 432 | + $sql .= " AND log_type = :type"; |
|
| 433 | 433 | $args['type'] = $type; |
| 434 | 434 | } |
| 435 | 435 | if ($text) { |
| 436 | - $sql .= " AND log_message LIKE CONCAT('%', :text, '%')"; |
|
| 436 | + $sql .= " AND log_message LIKE CONCAT('%', :text, '%')"; |
|
| 437 | 437 | $args['text'] = $text; |
| 438 | 438 | } |
| 439 | 439 | if ($ip) { |
| 440 | - $sql .= " AND ip_address LIKE CONCAT('%', :ip, '%')"; |
|
| 440 | + $sql .= " AND ip_address LIKE CONCAT('%', :ip, '%')"; |
|
| 441 | 441 | $args['ip'] = $ip; |
| 442 | 442 | } |
| 443 | 443 | if ($username) { |
| 444 | - $sql .= " AND user_name LIKE CONCAT('%', :user, '%')"; |
|
| 444 | + $sql .= " AND user_name LIKE CONCAT('%', :user, '%')"; |
|
| 445 | 445 | $args['user'] = $username; |
| 446 | 446 | } |
| 447 | 447 | if ($gedc) { |
| 448 | - $sql .= " AND gedcom_name = :gedc"; |
|
| 448 | + $sql .= " AND gedcom_name = :gedc"; |
|
| 449 | 449 | $args['gedc'] = $gedc; |
| 450 | 450 | } |
| 451 | 451 | |
| 452 | 452 | $sql .= " ORDER BY log_id"; |
| 453 | 453 | |
| 454 | - $rows = Database::prepare($sql )->execute($args)->fetchAll(); |
|
| 454 | + $rows = Database::prepare($sql)->execute($args)->fetchAll(); |
|
| 455 | 455 | |
| 456 | 456 | $data = ''; |
| 457 | 457 | |
@@ -165,7 +165,7 @@ |
||
| 165 | 165 | public function getFileAction(Request $request): Response { |
| 166 | 166 | $file = $request->get('file', ''); |
| 167 | 167 | |
| 168 | - if (!preg_match('/^(\d+)-([imnrs])-(\d+)$/', $file, $match)) { |
|
| 168 | + if (!preg_match('/^(\d+)-([imnrs])-(\d+)$/', $file, $match)) { |
|
| 169 | 169 | throw new NotFoundHttpException('Bad sitemap file'); |
| 170 | 170 | } |
| 171 | 171 | |
@@ -165,7 +165,7 @@ |
||
| 165 | 165 | public function getFileAction(Request $request): Response { |
| 166 | 166 | $file = $request->get('file', ''); |
| 167 | 167 | |
| 168 | - if (!preg_match('/^(\d+)-([imnrs])-(\d+)$/', $file, $match)) { |
|
| 168 | + if (!preg_match('/^(\d+)-([imnrs])-(\d+)$/', $file, $match)) { |
|
| 169 | 169 | throw new NotFoundHttpException('Bad sitemap file'); |
| 170 | 170 | } |
| 171 | 171 | |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | |
| 232 | 232 | // Create a source, to indicate the source of the data. |
| 233 | 233 | $filetext .= "0 @WEBTREES@ SOUR\n1 TITL " . WT_BASE_URL . "\n"; |
| 234 | - $author = User::find($tree->getPreference('CONTACT_EMAIL')); |
|
| 234 | + $author = User::find($tree->getPreference('CONTACT_EMAIL')); |
|
| 235 | 235 | if ($author !== null) { |
| 236 | 236 | $filetext .= '1 AUTH ' . $author->getRealName() . "\n"; |
| 237 | 237 | } |
@@ -608,7 +608,7 @@ discard block |
||
| 608 | 608 | |
| 609 | 609 | $xref = $request->get('xref'); |
| 610 | 610 | |
| 611 | - $media = Media::getInstance($xref, $tree); |
|
| 611 | + $media = Media::getInstance($xref, $tree); |
|
| 612 | 612 | |
| 613 | 613 | if ($media === null) { |
| 614 | 614 | throw new NotFoundHttpException; |
@@ -649,7 +649,7 @@ discard block |
||
| 649 | 649 | /** @var Tree $tree */ |
| 650 | 650 | $tree = $request->attributes->get('tree'); |
| 651 | 651 | |
| 652 | - $xref = $request->get('xref'); |
|
| 652 | + $xref = $request->get('xref'); |
|
| 653 | 653 | |
| 654 | 654 | $media = Media::getInstance($xref, $tree); |
| 655 | 655 | |
@@ -673,7 +673,7 @@ discard block |
||
| 673 | 673 | |
| 674 | 674 | $xref = $request->get('xref'); |
| 675 | 675 | |
| 676 | - $note = Note::getInstance($xref, $tree); |
|
| 676 | + $note = Note::getInstance($xref, $tree); |
|
| 677 | 677 | |
| 678 | 678 | if ($note === null) { |
| 679 | 679 | throw new NotFoundHttpException; |
@@ -714,7 +714,7 @@ discard block |
||
| 714 | 714 | /** @var Tree $tree */ |
| 715 | 715 | $tree = $request->attributes->get('tree'); |
| 716 | 716 | |
| 717 | - $xref = $request->get('xref'); |
|
| 717 | + $xref = $request->get('xref'); |
|
| 718 | 718 | |
| 719 | 719 | $note = Note::getInstance($xref, $tree); |
| 720 | 720 | |
@@ -738,7 +738,7 @@ discard block |
||
| 738 | 738 | |
| 739 | 739 | $xref = $request->get('xref'); |
| 740 | 740 | |
| 741 | - $repository = Repository::getInstance($xref, $tree); |
|
| 741 | + $repository = Repository::getInstance($xref, $tree); |
|
| 742 | 742 | |
| 743 | 743 | if ($repository === null) { |
| 744 | 744 | throw new NotFoundHttpException; |
@@ -779,7 +779,7 @@ discard block |
||
| 779 | 779 | /** @var Tree $tree */ |
| 780 | 780 | $tree = $request->attributes->get('tree'); |
| 781 | 781 | |
| 782 | - $xref = $request->get('xref'); |
|
| 782 | + $xref = $request->get('xref'); |
|
| 783 | 783 | |
| 784 | 784 | $repository = Repository::getInstance($xref, $tree); |
| 785 | 785 | |
@@ -803,7 +803,7 @@ discard block |
||
| 803 | 803 | |
| 804 | 804 | $xref = $request->get('xref'); |
| 805 | 805 | |
| 806 | - $source = Source::getInstance($xref, $tree); |
|
| 806 | + $source = Source::getInstance($xref, $tree); |
|
| 807 | 807 | |
| 808 | 808 | if ($source === null) { |
| 809 | 809 | throw new NotFoundHttpException; |
@@ -889,7 +889,7 @@ discard block |
||
| 889 | 889 | $records = array_filter($records); |
| 890 | 890 | |
| 891 | 891 | // Group and sort. |
| 892 | - uasort($records, function(GedcomRecord $x, GedcomRecord $y) { |
|
| 892 | + uasort($records, function (GedcomRecord $x, GedcomRecord $y) { |
|
| 893 | 893 | return $x::RECORD_TYPE <=> $y::RECORD_TYPE ?: GedcomRecord::compare($x, $y); |
| 894 | 894 | }); |
| 895 | 895 | |
@@ -223,7 +223,7 @@ |
||
| 223 | 223 | /** @var Tree $tree */ |
| 224 | 224 | $tree = $request->attributes->get('tree'); |
| 225 | 225 | |
| 226 | - $xref = $request->get('xref', ''); |
|
| 226 | + $xref = $request->get('xref', ''); |
|
| 227 | 227 | |
| 228 | 228 | $individual = Individual::getInstance($xref, $tree); |
| 229 | 229 | |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | $this->checkModuleIsActive($tree, 'descendancy_chart'); |
| 103 | 103 | |
| 104 | - $xref = $request->get('xref'); |
|
| 104 | + $xref = $request->get('xref'); |
|
| 105 | 105 | $individual = Individual::getInstance($xref, $tree); |
| 106 | 106 | |
| 107 | 107 | $this->checkIndividualAccess($individual); |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | |
| 119 | 119 | $descendants = $this->descendants($individual, $generations, []); |
| 120 | 120 | |
| 121 | - switch($chart_style) { |
|
| 121 | + switch ($chart_style) { |
|
| 122 | 122 | case self::CHART_STYLE_LIST: |
| 123 | 123 | default: |
| 124 | 124 | return $this->descendantsList($individual, $generations); |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | * @return Response |
| 316 | 316 | */ |
| 317 | 317 | private function descendantsFamilies(Tree $tree, array $descendants): Response { |
| 318 | - $families = []; |
|
| 318 | + $families = []; |
|
| 319 | 319 | foreach ($descendants as $individual) { |
| 320 | 320 | foreach ($individual->getChildFamilies() as $family) { |
| 321 | 321 | $families[$family->getXref()] = $family; |