diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2021-06-12 13:44:59 +0100 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2021-06-12 13:44:59 +0100 |
| commit | 9062008fc4236b127d2bb93afbc618eff6465994 (patch) | |
| tree | cbfd814871afc1677f2c13e444b707d2fb0869e2 /app | |
| parent | 80b8681044194abdb233da4b677e8ba275123abe (diff) | |
| download | webtrees-9062008fc4236b127d2bb93afbc618eff6465994.tar.gz webtrees-9062008fc4236b127d2bb93afbc618eff6465994.tar.bz2 webtrees-9062008fc4236b127d2bb93afbc618eff6465994.zip | |
Testing
Diffstat (limited to 'app')
| -rw-r--r-- | app/Module/RelationshipsChartModule.php | 1 | ||||
| -rw-r--r-- | app/Tree.php | 15 |
2 files changed, 8 insertions, 8 deletions
diff --git a/app/Module/RelationshipsChartModule.php b/app/Module/RelationshipsChartModule.php index beddcb29c4..71591383e9 100644 --- a/app/Module/RelationshipsChartModule.php +++ b/app/Module/RelationshipsChartModule.php @@ -26,7 +26,6 @@ use Fisharebest\Algorithm\Dijkstra; use Fisharebest\Webtrees\Auth; use Fisharebest\Webtrees\Contracts\UserInterface; use Fisharebest\Webtrees\FlashMessages; -use Fisharebest\Webtrees\Functions\Functions; use Fisharebest\Webtrees\GedcomRecord; use Fisharebest\Webtrees\I18N; use Fisharebest\Webtrees\Individual; diff --git a/app/Tree.php b/app/Tree.php index eab0407353..32db12e329 100644 --- a/app/Tree.php +++ b/app/Tree.php @@ -70,7 +70,7 @@ class Tree 'LANGUAGE' => 'en-US', 'MAX_ALIVE_AGE' => '120', 'MEDIA_DIRECTORY' => 'media/', - 'MEDIA_UPLOAD' => Auth::PRIV_USER, + 'MEDIA_UPLOAD' => '1', // Auth::PRIV_USER 'META_DESCRIPTION' => '', 'META_TITLE' => Webtrees::NAME, 'NO_UPDATE_CHAN' => '0', @@ -82,15 +82,15 @@ class Tree 'SAVE_WATERMARK_IMAGE' => '0', 'SHOW_AGE_DIFF' => '0', 'SHOW_COUNTER' => '1', - 'SHOW_DEAD_PEOPLE' => Auth::PRIV_PRIVATE, + 'SHOW_DEAD_PEOPLE' => '2', // Auth::PRIV_PRIVATE 'SHOW_EST_LIST_DATES' => '0', 'SHOW_FACT_ICONS' => '1', 'SHOW_GEDCOM_RECORD' => '0', 'SHOW_HIGHLIGHT_IMAGES' => '1', 'SHOW_LEVEL2_NOTES' => '1', - 'SHOW_LIVING_NAMES' => Auth::PRIV_USER, + 'SHOW_LIVING_NAMES' => '1', // Auth::PRIV_USER 'SHOW_MEDIA_DOWNLOAD' => '0', - 'SHOW_NO_WATERMARK' => Auth::PRIV_USER, + 'SHOW_NO_WATERMARK' => '1', // Auth::PRIV_USER 'SHOW_PARENTS_AGE' => '1', 'SHOW_PEDIGREE_PLACES' => '9', 'SHOW_PEDIGREE_PLACES_SUFFIX' => '0', @@ -206,11 +206,12 @@ class Tree /** * Get the tree’s configuration settings. * - * @param string $setting_name + * @param string $setting_name + * @param string|null $default * * @return string */ - public function getPreference(string $setting_name): string + public function getPreference(string $setting_name, string $default = null): string { if ($this->preferences === []) { $this->preferences = DB::table('gedcom_setting') @@ -219,7 +220,7 @@ class Tree ->all(); } - return $this->preferences[$setting_name] ?? self::DEFAULT_PREFERENCES[$setting_name] ?? ''; + return $this->preferences[$setting_name] ?? $default ?? self::DEFAULT_PREFERENCES[$setting_name] ?? ''; } /** |
