@@ -76,7 +76,7 @@ |
||
| 76 | 76 | { |
| 77 | 77 | $latest_version = $this->fetchLatestVersion(); |
| 78 | 78 | |
| 79 | - [, , $url] = explode('|', $latest_version . '||'); |
|
| 79 | + [,, $url] = explode('|', $latest_version . '||'); |
|
| 80 | 80 | |
| 81 | 81 | return $url; |
| 82 | 82 | } |
@@ -214,7 +214,7 @@ |
||
| 214 | 214 | public static function updateSchema($namespace, $schema_name, $target_version): bool |
| 215 | 215 | { |
| 216 | 216 | try { |
| 217 | - $current_version = (int)Site::getPreference($schema_name); |
|
| 217 | + $current_version = (int) Site::getPreference($schema_name); |
|
| 218 | 218 | } catch (PDOException $ex) { |
| 219 | 219 | // During initial installation, the site_preference table won’t exist. |
| 220 | 220 | $current_version = 0; |
@@ -432,11 +432,11 @@ |
||
| 432 | 432 | /* I18N: a program feature */ |
| 433 | 433 | 'simplexml' => I18N::translate('reporting'), |
| 434 | 434 | ]; |
| 435 | - $settings = [ |
|
| 435 | + $settings = [ |
|
| 436 | 436 | /* I18N: a program feature */ |
| 437 | 437 | 'file_uploads' => I18N::translate('file upload capability'), |
| 438 | 438 | ]; |
| 439 | - $warnings = []; |
|
| 439 | + $warnings = []; |
|
| 440 | 440 | |
| 441 | 441 | foreach ($extensions as $extension => $features) { |
| 442 | 442 | if (!extension_loaded($extension)) { |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | |
| 71 | 71 | $top10 = DB::table('hit_counter') |
| 72 | 72 | ->where('gedcom_id', '=', $tree->id()) |
| 73 | - ->whereIn('page_name', ['individual.php','family.php','source.php','repo.php','note.php','mediaviewer.php']) |
|
| 73 | + ->whereIn('page_name', ['individual.php', 'family.php', 'source.php', 'repo.php', 'note.php', 'mediaviewer.php']) |
|
| 74 | 74 | ->orderByDesc('page_count') |
| 75 | 75 | ->limit((int) $num) |
| 76 | 76 | ->pluck('page_count', 'page_parameter'); |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | { |
| 29 | 29 | public const RECORD_TYPE = 'SOUR'; |
| 30 | 30 | |
| 31 | - protected const ROUTE_NAME = 'source'; |
|
| 31 | + protected const ROUTE_NAME = 'source'; |
|
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * A closure which will create a record from a database row. |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | { |
| 95 | 95 | $url = $request->get('url', ''); |
| 96 | 96 | $xref = $request->get('xref', ''); |
| 97 | - $change_id = (int)$request->get('change_id'); |
|
| 97 | + $change_id = (int) $request->get('change_id'); |
|
| 98 | 98 | |
| 99 | 99 | $changes = DB::table('change') |
| 100 | 100 | ->where('gedcom_id', '=', $tree->id()) |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | { |
| 192 | 192 | $url = $request->get('url', ''); |
| 193 | 193 | $xref = $request->get('xref', ''); |
| 194 | - $change_id = (int)$request->get('change_id'); |
|
| 194 | + $change_id = (int) $request->get('change_id'); |
|
| 195 | 195 | |
| 196 | 196 | // Reject a change, and subsequent changes to the same record |
| 197 | 197 | DB::table('change') |
@@ -149,7 +149,7 @@ |
||
| 149 | 149 | 'ged' => $tree->name(), |
| 150 | 150 | 'show_all' => 'yes', |
| 151 | 151 | ]; |
| 152 | - $show = $request->get('show', 'surn'); |
|
| 152 | + $show = $request->get('show', 'surn'); |
|
| 153 | 153 | } |
| 154 | 154 | } elseif ($surname) { |
| 155 | 155 | $alpha = $this->localization_service->initialLetter($surname); // so we can highlight the initial letter |
@@ -223,7 +223,8 @@ discard block |
||
| 223 | 223 | <li class="wt-initials-list-item d-flex"> |
| 224 | 224 | <?php if ($count > 0) : ?> |
| 225 | 225 | <a href="<?= e(route($route, ['alpha' => $letter, 'ged' => $tree->name()])) ?>" class="wt-initial px-1<?= $letter === $alpha ? ' active' : '' ?> '" title="<?= I18N::number($count) ?>"><?= $this->surnameInitial((string) $letter) ?></a> |
| 226 | - <?php else : ?> |
|
| 226 | + <?php else { |
|
| 227 | + : ?> |
|
| 227 | 228 | <span class="wt-initial px-1 text-muted"><?= $this->surnameInitial((string) $letter) ?></span> |
| 228 | 229 | |
| 229 | 230 | <?php endif ?> |
@@ -277,6 +278,7 @@ discard block |
||
| 277 | 278 | |
| 278 | 279 | if ($show === 'indi' || $show === 'surn') { |
| 279 | 280 | $surns = $this->individual_list_service->surnames($surname, $alpha, $show_marnm === 'yes', $families, WT_LOCALE, I18N::collation()); |
| 281 | +} |
|
| 280 | 282 | if ($show === 'surn') { |
| 281 | 283 | // Show the surname list |
| 282 | 284 | switch ($tree->getPreference('SURNAME_LIST_STYLE')) { |
@@ -291,7 +291,7 @@ |
||
| 291 | 291 | 'provider' => 'openstreetmap', |
| 292 | 292 | 'style' => 'mapnik', |
| 293 | 293 | ]; |
| 294 | - self::$map_providers = [ |
|
| 294 | + self::$map_providers = [ |
|
| 295 | 295 | 'openstreetmap' => [ |
| 296 | 296 | 'name' => 'OpenStreetMap', |
| 297 | 297 | 'styles' => ['mapnik' => 'Mapnik'], |
@@ -399,19 +399,19 @@ |
||
| 399 | 399 | private function faqsExist(Tree $tree, string $language): bool |
| 400 | 400 | { |
| 401 | 401 | return DB::table('block') |
| 402 | - ->join('block_setting', 'block_setting.block_id', '=', 'block.block_id') |
|
| 403 | - ->where('module_name', '=', $this->name()) |
|
| 404 | - ->where('setting_name', '=', 'languages') |
|
| 405 | - ->where(function (Builder $query) use ($tree): void { |
|
| 406 | - $query |
|
| 407 | - ->whereNull('gedcom_id') |
|
| 408 | - ->orWhere('gedcom_id', '=', $tree->id()); |
|
| 409 | - }) |
|
| 410 | - ->select(['setting_value AS languages']) |
|
| 411 | - ->get() |
|
| 412 | - ->filter(function (stdClass $faq) use ($language): bool { |
|
| 413 | - return $faq->languages === '' || in_array($language, explode(',', $faq->languages)); |
|
| 414 | - }) |
|
| 402 | + ->join('block_setting', 'block_setting.block_id', '=', 'block.block_id') |
|
| 403 | + ->where('module_name', '=', $this->name()) |
|
| 404 | + ->where('setting_name', '=', 'languages') |
|
| 405 | + ->where(function (Builder $query) use ($tree): void { |
|
| 406 | + $query |
|
| 407 | + ->whereNull('gedcom_id') |
|
| 408 | + ->orWhere('gedcom_id', '=', $tree->id()); |
|
| 409 | + }) |
|
| 410 | + ->select(['setting_value AS languages']) |
|
| 411 | + ->get() |
|
| 412 | + ->filter(function (stdClass $faq) use ($language): bool { |
|
| 413 | + return $faq->languages === '' || in_array($language, explode(',', $faq->languages)); |
|
| 414 | + }) |
|
| 415 | 415 | ->isNotEmpty(); |
| 416 | 416 | } |
| 417 | 417 | } |