@@ -20,11 +20,13 @@ |
||
20 | 20 | /** |
21 | 21 | * Upgrade the database schema from version 26 to version 27. |
22 | 22 | */ |
23 | -class Migration26 implements MigrationInterface { |
|
23 | +class Migration26 implements MigrationInterface |
|
24 | +{ |
|
24 | 25 | /** |
25 | 26 | * Upgrade to to the next version |
26 | 27 | */ |
27 | - public function upgrade() { |
|
28 | + public function upgrade() |
|
29 | + { |
|
28 | 30 | // Earlier versions of webtrees put quote marks round soundex codes. |
29 | 31 | // These are harmless, but clean them up for consistency. |
30 | 32 | Database::exec( |
@@ -20,11 +20,13 @@ |
||
20 | 20 | /** |
21 | 21 | * Upgrade the database schema from version 23 to version 24. |
22 | 22 | */ |
23 | -class Migration23 implements MigrationInterface { |
|
23 | +class Migration23 implements MigrationInterface |
|
24 | +{ |
|
24 | 25 | /** |
25 | 26 | * Upgrade to to the next version |
26 | 27 | */ |
27 | - public function upgrade() { |
|
28 | + public function upgrade() |
|
29 | + { |
|
28 | 30 | // - media table columns should be not null, so we can find |
29 | 31 | // media objects with missing files |
30 | 32 | Database::exec( |
@@ -21,11 +21,13 @@ |
||
21 | 21 | /** |
22 | 22 | * Upgrade the database schema from version 4 to version 5. |
23 | 23 | */ |
24 | -class Migration4 implements MigrationInterface { |
|
24 | +class Migration4 implements MigrationInterface |
|
25 | +{ |
|
25 | 26 | /** |
26 | 27 | * Upgrade to to the next version |
27 | 28 | */ |
28 | - public function upgrade() { |
|
29 | + public function upgrade() |
|
30 | + { |
|
29 | 31 | // Add support for sorting gedcoms non-alphabetically |
30 | 32 | // Also clean out some old/unused values and files. |
31 | 33 | try { |
@@ -21,11 +21,13 @@ |
||
21 | 21 | /** |
22 | 22 | * Upgrade the database schema from version 18 to version 19. |
23 | 23 | */ |
24 | -class Migration18 implements MigrationInterface { |
|
24 | +class Migration18 implements MigrationInterface |
|
25 | +{ |
|
25 | 26 | /** |
26 | 27 | * Upgrade to to the next version |
27 | 28 | */ |
28 | - public function upgrade() { |
|
29 | + public function upgrade() |
|
30 | + { |
|
29 | 31 | // Update some indexes, based on analysis of slow-query-logs |
30 | 32 | try { |
31 | 33 | Database::exec( |
@@ -20,11 +20,13 @@ |
||
20 | 20 | /** |
21 | 21 | * Upgrade the database schema from version 29 to version 30. |
22 | 22 | */ |
23 | -class Migration29 implements MigrationInterface { |
|
23 | +class Migration29 implements MigrationInterface |
|
24 | +{ |
|
24 | 25 | /** |
25 | 26 | * Upgrade to to the next version |
26 | 27 | */ |
27 | - public function upgrade() { |
|
28 | + public function upgrade() |
|
29 | + { |
|
28 | 30 | // Originally migrated from PhpGedView, but never used. |
29 | 31 | Database::exec("DROP TABLE IF EXISTS `##ip_address`"); |
30 | 32 |
@@ -18,7 +18,8 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Provide an interface to the wt_site_setting table. |
20 | 20 | */ |
21 | -class Site { |
|
21 | +class Site |
|
22 | +{ |
|
22 | 23 | /** |
23 | 24 | * Everything from the wt_site_setting table. |
24 | 25 | * |
@@ -33,7 +34,8 @@ discard block |
||
33 | 34 | * |
34 | 35 | * @return string|null |
35 | 36 | */ |
36 | - public static function getPreference($setting_name) { |
|
37 | + public static function getPreference($setting_name) |
|
38 | + { |
|
37 | 39 | // There are lots of settings, and we need to fetch lots of them on every page |
38 | 40 | // so it is quicker to fetch them all in one go. |
39 | 41 | if (self::$settings === null) { |
@@ -56,7 +58,8 @@ discard block |
||
56 | 58 | * @param string $setting_name |
57 | 59 | * @param string|int|bool $setting_value |
58 | 60 | */ |
59 | - public static function setPreference($setting_name, $setting_value) { |
|
61 | + public static function setPreference($setting_name, $setting_value) |
|
62 | + { |
|
60 | 63 | // Only need to update the database if the setting has actually changed. |
61 | 64 | if (self::getPreference($setting_name) != $setting_value) { |
62 | 65 | if ($setting_value === null) { |
@@ -18,12 +18,14 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Controller for all popup pages |
20 | 20 | */ |
21 | -class SimpleController extends PageController { |
|
21 | +class SimpleController extends PageController |
|
22 | +{ |
|
22 | 23 | /** |
23 | 24 | * Create content for a popup window. |
24 | 25 | * The page title is not used by all browsers. |
25 | 26 | */ |
26 | - public function __construct() { |
|
27 | + public function __construct() |
|
28 | + { |
|
27 | 29 | parent::__construct(); |
28 | 30 | $this->setPageTitle(WT_WEBTREES); |
29 | 31 | } |
@@ -35,7 +37,8 @@ discard block |
||
35 | 37 | * |
36 | 38 | * @return $this |
37 | 39 | */ |
38 | - public function pageHeader($popup = true) { |
|
40 | + public function pageHeader($popup = true) |
|
41 | + { |
|
39 | 42 | return parent::pageHeader($popup); |
40 | 43 | } |
41 | 44 | |
@@ -46,7 +49,8 @@ discard block |
||
46 | 49 | * |
47 | 50 | * @return $this |
48 | 51 | */ |
49 | - public function restrictAccess($condition) { |
|
52 | + public function restrictAccess($condition) |
|
53 | + { |
|
50 | 54 | if ($condition !== true) { |
51 | 55 | $this->addInlineJavascript('opener.window.location.reload(); window.close();'); |
52 | 56 | exit; |
@@ -23,7 +23,8 @@ discard block |
||
23 | 23 | /** |
24 | 24 | * Controller for the pedigree chart |
25 | 25 | */ |
26 | -class PedigreeController extends ChartController { |
|
26 | +class PedigreeController extends ChartController |
|
27 | +{ |
|
27 | 28 | /** |
28 | 29 | * Chart orientation codes |
29 | 30 | * Dont change them! the offset calculations rely on this order |
@@ -63,7 +64,8 @@ discard block |
||
63 | 64 | /** |
64 | 65 | * Create a pedigree controller |
65 | 66 | */ |
66 | - public function __construct() { |
|
67 | + public function __construct() |
|
68 | + { |
|
67 | 69 | global $WT_TREE; |
68 | 70 | |
69 | 71 | parent::__construct(); |
@@ -256,7 +258,8 @@ discard block |
||
256 | 258 | * |
257 | 259 | * @return string |
258 | 260 | */ |
259 | - public function getMenu() { |
|
261 | + public function getMenu() |
|
262 | + { |
|
260 | 263 | $famids = $this->root->getSpouseFamilies(); |
261 | 264 | $html = ''; |
262 | 265 | if ($famids) { |
@@ -306,7 +309,8 @@ discard block |
||
306 | 309 | * |
307 | 310 | * @return string |
308 | 311 | */ |
309 | - public function gotoPreviousGen($index) { |
|
312 | + public function gotoPreviousGen($index) |
|
313 | + { |
|
310 | 314 | $html = ''; |
311 | 315 | if ($this->chartHasAncestors) { |
312 | 316 | if ($this->nodes[$index]['indi'] && $this->nodes[$index]['indi']->getChildFamilies()) { |
@@ -27,14 +27,16 @@ discard block |
||
27 | 27 | /** |
28 | 28 | * Controller for the family page |
29 | 29 | */ |
30 | -class FamilyController extends GedcomRecordController { |
|
30 | +class FamilyController extends GedcomRecordController |
|
31 | +{ |
|
31 | 32 | /** |
32 | 33 | * Get significant information from this page, to allow other pages such as |
33 | 34 | * charts and reports to initialise with the same records |
34 | 35 | * |
35 | 36 | * @return Individual |
36 | 37 | */ |
37 | - public function getSignificantIndividual() { |
|
38 | + public function getSignificantIndividual() |
|
39 | + { |
|
38 | 40 | if ($this->record) { |
39 | 41 | foreach ($this->record->getSpouses() as $individual) { |
40 | 42 | return $individual; |
@@ -53,7 +55,8 @@ discard block |
||
53 | 55 | * |
54 | 56 | * @return Family |
55 | 57 | */ |
56 | - public function getSignificantFamily() { |
|
58 | + public function getSignificantFamily() |
|
59 | + { |
|
57 | 60 | if ($this->record) { |
58 | 61 | return $this->record; |
59 | 62 | } |
@@ -64,7 +67,8 @@ discard block |
||
64 | 67 | /** |
65 | 68 | * get edit menu |
66 | 69 | */ |
67 | - public function getEditMenu() { |
|
70 | + public function getEditMenu() |
|
71 | + { |
|
68 | 72 | if (!$this->record || $this->record->isPendingDeletion()) { |
69 | 73 | return null; |
70 | 74 | } |
@@ -112,7 +116,8 @@ discard block |
||
112 | 116 | * |
113 | 117 | * @return string |
114 | 118 | */ |
115 | - public function getSignificantSurname() { |
|
119 | + public function getSignificantSurname() |
|
120 | + { |
|
116 | 121 | if ($this->record && $this->record->getHusband()) { |
117 | 122 | list($surn) = explode(',', $this->record->getHusband()->getSortName()); |
118 | 123 | |
@@ -125,7 +130,8 @@ discard block |
||
125 | 130 | /** |
126 | 131 | * Print the facts |
127 | 132 | */ |
128 | - public function printFamilyFacts() { |
|
133 | + public function printFamilyFacts() |
|
134 | + { |
|
129 | 135 | global $linkToID; |
130 | 136 | |
131 | 137 | $linkToID = $this->record->getXref(); // -- Tell addmedia.php what to link to |