@@ -27,7 +27,8 @@ discard block |
||
27 | 27 | /** |
28 | 28 | * Class AlbumModule |
29 | 29 | */ |
30 | -class AlbumModule extends AbstractModule implements ModuleTabInterface { |
|
30 | +class AlbumModule extends AbstractModule implements ModuleTabInterface |
|
31 | +{ |
|
31 | 32 | /** @var Media[] List of media objects. */ |
32 | 33 | private $media_list; |
33 | 34 | |
@@ -36,7 +37,8 @@ discard block |
||
36 | 37 | * |
37 | 38 | * @return string |
38 | 39 | */ |
39 | - public function getTitle() { |
|
40 | + public function getTitle() |
|
41 | + { |
|
40 | 42 | return /* I18N: Name of a module */ I18N::translate('Album'); |
41 | 43 | } |
42 | 44 | |
@@ -45,7 +47,8 @@ discard block |
||
45 | 47 | * |
46 | 48 | * @return string |
47 | 49 | */ |
48 | - public function getDescription() { |
|
50 | + public function getDescription() |
|
51 | + { |
|
49 | 52 | return /* I18N: Description of the “Album” module */ I18N::translate('An alternative to the “media” tab, and an enhanced image viewer.'); |
50 | 53 | } |
51 | 54 | |
@@ -55,7 +58,8 @@ discard block |
||
55 | 58 | * |
56 | 59 | * @return int |
57 | 60 | */ |
58 | - public function defaultTabOrder() { |
|
61 | + public function defaultTabOrder() |
|
62 | + { |
|
59 | 63 | return 60; |
60 | 64 | } |
61 | 65 | |
@@ -64,7 +68,8 @@ discard block |
||
64 | 68 | * |
65 | 69 | * @return bool |
66 | 70 | */ |
67 | - public function hasTabContent() { |
|
71 | + public function hasTabContent() |
|
72 | + { |
|
68 | 73 | global $WT_TREE; |
69 | 74 | |
70 | 75 | return Auth::isEditor($WT_TREE) || $this->getMedia(); |
@@ -76,7 +81,8 @@ discard block |
||
76 | 81 | * |
77 | 82 | * @return bool |
78 | 83 | */ |
79 | - public function isGrayedOut() { |
|
84 | + public function isGrayedOut() |
|
85 | + { |
|
80 | 86 | return !$this->getMedia(); |
81 | 87 | } |
82 | 88 | |
@@ -85,7 +91,8 @@ discard block |
||
85 | 91 | * |
86 | 92 | * @return string |
87 | 93 | */ |
88 | - public function getTabContent() { |
|
94 | + public function getTabContent() |
|
95 | + { |
|
89 | 96 | global $WT_TREE, $controller; |
90 | 97 | |
91 | 98 | $html = '<div id="' . $this->getName() . '_content">'; |
@@ -210,7 +217,8 @@ discard block |
||
210 | 217 | * |
211 | 218 | * @return Media[] |
212 | 219 | */ |
213 | - private function getMedia() { |
|
220 | + private function getMedia() |
|
221 | + { |
|
214 | 222 | global $controller; |
215 | 223 | |
216 | 224 | if ($this->media_list === null) { |
@@ -255,7 +263,8 @@ discard block |
||
255 | 263 | * |
256 | 264 | * @return bool |
257 | 265 | */ |
258 | - public function canLoadAjax() { |
|
266 | + public function canLoadAjax() |
|
267 | + { |
|
259 | 268 | return !Auth::isSearchEngine(); // Search engines cannot use AJAX |
260 | 269 | } |
261 | 270 | |
@@ -266,7 +275,8 @@ discard block |
||
266 | 275 | * |
267 | 276 | * @return string |
268 | 277 | */ |
269 | - public function getPreLoadContent() { |
|
278 | + public function getPreLoadContent() |
|
279 | + { |
|
270 | 280 | return ''; |
271 | 281 | } |
272 | 282 | } |
@@ -22,15 +22,18 @@ discard block |
||
22 | 22 | /** |
23 | 23 | * Class FactSourcesReportModule |
24 | 24 | */ |
25 | -class FactSourcesReportModule extends AbstractModule implements ModuleReportInterface { |
|
25 | +class FactSourcesReportModule extends AbstractModule implements ModuleReportInterface |
|
26 | +{ |
|
26 | 27 | /** {@inheritdoc} */ |
27 | - public function getTitle() { |
|
28 | + public function getTitle() |
|
29 | + { |
|
28 | 30 | // This text also appears in the .XML file - update both together |
29 | 31 | return /* I18N: Name of a module/report */ I18N::translate('Source'); |
30 | 32 | } |
31 | 33 | |
32 | 34 | /** {@inheritdoc} */ |
33 | - public function getDescription() { |
|
35 | + public function getDescription() |
|
36 | + { |
|
34 | 37 | // This text also appears in the .XML file - update both together |
35 | 38 | return /* I18N: Description of the “Source” module */ I18N::translate('A report of the information provided by a source.'); |
36 | 39 | } |
@@ -42,7 +45,8 @@ discard block |
||
42 | 45 | * |
43 | 46 | * @return int |
44 | 47 | */ |
45 | - public function defaultAccessLevel() { |
|
48 | + public function defaultAccessLevel() |
|
49 | + { |
|
46 | 50 | return Auth::PRIV_USER; |
47 | 51 | } |
48 | 52 | |
@@ -51,7 +55,8 @@ discard block |
||
51 | 55 | * |
52 | 56 | * @return Menu |
53 | 57 | */ |
54 | - public function getReportMenu() { |
|
58 | + public function getReportMenu() |
|
59 | + { |
|
55 | 60 | global $WT_TREE; |
56 | 61 | |
57 | 62 | return new Menu( |
@@ -23,13 +23,15 @@ discard block |
||
23 | 23 | /** |
24 | 24 | * Class TimelineChartModule |
25 | 25 | */ |
26 | -class TimelineChartModule extends AbstractModule implements ModuleChartInterface { |
|
26 | +class TimelineChartModule extends AbstractModule implements ModuleChartInterface |
|
27 | +{ |
|
27 | 28 | /** |
28 | 29 | * How should this module be labelled on tabs, menus, etc.? |
29 | 30 | * |
30 | 31 | * @return string |
31 | 32 | */ |
32 | - public function getTitle() { |
|
33 | + public function getTitle() |
|
34 | + { |
|
33 | 35 | return /* I18N: Name of a module/chart */ I18N::translate('Timeline'); |
34 | 36 | } |
35 | 37 | |
@@ -38,7 +40,8 @@ discard block |
||
38 | 40 | * |
39 | 41 | * @return string |
40 | 42 | */ |
41 | - public function getDescription() { |
|
43 | + public function getDescription() |
|
44 | + { |
|
42 | 45 | return /* I18N: Description of the “TimelineChart” module */ I18N::translate('A timeline displaying individual events.'); |
43 | 46 | } |
44 | 47 | |
@@ -49,7 +52,8 @@ discard block |
||
49 | 52 | * |
50 | 53 | * @return int |
51 | 54 | */ |
52 | - public function defaultAccessLevel() { |
|
55 | + public function defaultAccessLevel() |
|
56 | + { |
|
53 | 57 | return Auth::PRIV_PRIVATE; |
54 | 58 | } |
55 | 59 | |
@@ -58,7 +62,8 @@ discard block |
||
58 | 62 | * |
59 | 63 | * @return Menu|null |
60 | 64 | */ |
61 | - public function getChartMenu(Individual $individual) { |
|
65 | + public function getChartMenu(Individual $individual) |
|
66 | + { |
|
62 | 67 | return new Menu( |
63 | 68 | $this->getTitle(), |
64 | 69 | 'timeline.php?pids%5B%5D=' . $individual->getXref() . '&ged=' . $individual->getTree()->getNameUrl(), |
@@ -72,7 +77,8 @@ discard block |
||
72 | 77 | * |
73 | 78 | * @return Menu|null |
74 | 79 | */ |
75 | - public function getBoxChartMenu(Individual $individual) { |
|
80 | + public function getBoxChartMenu(Individual $individual) |
|
81 | + { |
|
76 | 82 | return null; |
77 | 83 | } |
78 | 84 | } |
@@ -34,7 +34,8 @@ discard block |
||
34 | 34 | * Note that the user favorites module simply extends this module, so ensure that the |
35 | 35 | * logic works for both. |
36 | 36 | */ |
37 | -class FamilyTreeFavoritesModule extends AbstractModule implements ModuleBlockInterface { |
|
37 | +class FamilyTreeFavoritesModule extends AbstractModule implements ModuleBlockInterface |
|
38 | +{ |
|
38 | 39 | // How to update the database schema for this module |
39 | 40 | const SCHEMA_TARGET_VERSION = 4; |
40 | 41 | const SCHEMA_SETTING_NAME = 'FV_SCHEMA_VERSION'; |
@@ -45,7 +46,8 @@ discard block |
||
45 | 46 | * |
46 | 47 | * @param string $directory Where is this module installed |
47 | 48 | */ |
48 | - public function __construct($directory) { |
|
49 | + public function __construct($directory) |
|
50 | + { |
|
49 | 51 | parent::__construct($directory); |
50 | 52 | |
51 | 53 | // Create/update the database tables. |
@@ -58,7 +60,8 @@ discard block |
||
58 | 60 | * |
59 | 61 | * @return string |
60 | 62 | */ |
61 | - public function getTitle() { |
|
63 | + public function getTitle() |
|
64 | + { |
|
62 | 65 | return /* I18N: Name of a module */ I18N::translate('Favorites'); |
63 | 66 | } |
64 | 67 | |
@@ -67,7 +70,8 @@ discard block |
||
67 | 70 | * |
68 | 71 | * @return string |
69 | 72 | */ |
70 | - public function getDescription() { |
|
73 | + public function getDescription() |
|
74 | + { |
|
71 | 75 | return /* I18N: Description of the “Favorites” module */ I18N::translate('Display and manage a family tree’s favorite pages.'); |
72 | 76 | } |
73 | 77 | |
@@ -80,7 +84,8 @@ discard block |
||
80 | 84 | * |
81 | 85 | * @return string |
82 | 86 | */ |
83 | - public function getBlock($block_id, $template = true, $cfg = array()) { |
|
87 | + public function getBlock($block_id, $template = true, $cfg = array()) |
|
88 | + { |
|
84 | 89 | global $ctype, $controller, $WT_TREE; |
85 | 90 | |
86 | 91 | $action = Filter::get('action'); |
@@ -248,7 +253,8 @@ discard block |
||
248 | 253 | * |
249 | 254 | * @return bool |
250 | 255 | */ |
251 | - public function loadAjax() { |
|
256 | + public function loadAjax() |
|
257 | + { |
|
252 | 258 | return false; |
253 | 259 | } |
254 | 260 | |
@@ -257,7 +263,8 @@ discard block |
||
257 | 263 | * |
258 | 264 | * @return bool |
259 | 265 | */ |
260 | - public function isUserBlock() { |
|
266 | + public function isUserBlock() |
|
267 | + { |
|
261 | 268 | return false; |
262 | 269 | } |
263 | 270 | |
@@ -266,7 +273,8 @@ discard block |
||
266 | 273 | * |
267 | 274 | * @return bool |
268 | 275 | */ |
269 | - public function isGedcomBlock() { |
|
276 | + public function isGedcomBlock() |
|
277 | + { |
|
270 | 278 | return true; |
271 | 279 | } |
272 | 280 | |
@@ -275,7 +283,8 @@ discard block |
||
275 | 283 | * |
276 | 284 | * @param int $block_id |
277 | 285 | */ |
278 | - public function configureBlock($block_id) { |
|
286 | + public function configureBlock($block_id) |
|
287 | + { |
|
279 | 288 | if (Filter::postBool('save') && Filter::checkCsrf()) { |
280 | 289 | $this->setBlockSetting($block_id, 'block', Filter::postBool('block')); |
281 | 290 | } |
@@ -296,7 +305,8 @@ discard block |
||
296 | 305 | * |
297 | 306 | * @return bool |
298 | 307 | */ |
299 | - public static function deleteFavorite($favorite_id) { |
|
308 | + public static function deleteFavorite($favorite_id) |
|
309 | + { |
|
300 | 310 | return (bool) |
301 | 311 | Database::prepare("DELETE FROM `##favorite` WHERE favorite_id=?") |
302 | 312 | ->execute(array($favorite_id)); |
@@ -309,7 +319,8 @@ discard block |
||
309 | 319 | * |
310 | 320 | * @return bool |
311 | 321 | */ |
312 | - public static function addFavorite($favorite) { |
|
322 | + public static function addFavorite($favorite) |
|
323 | + { |
|
313 | 324 | // -- make sure a favorite is added |
314 | 325 | if (empty($favorite['gid']) && empty($favorite['url'])) { |
315 | 326 | return false; |
@@ -350,7 +361,8 @@ discard block |
||
350 | 361 | * |
351 | 362 | * @return string[][] |
352 | 363 | */ |
353 | - public static function getFavorites($gedcom_id) { |
|
364 | + public static function getFavorites($gedcom_id) |
|
365 | + { |
|
354 | 366 | return |
355 | 367 | Database::prepare( |
356 | 368 | "SELECT favorite_id AS id, user_id, gedcom_id, xref AS gid, favorite_type AS type, title, note, url" . |
@@ -33,13 +33,15 @@ discard block |
||
33 | 33 | */ |
34 | 34 | class ClippingsCartModule extends AbstractModule implements ModuleMenuInterface, ModuleSidebarInterface { |
35 | 35 | /** {@inheritdoc} */ |
36 | - public function getTitle() { |
|
36 | + public function getTitle() |
|
37 | + { |
|
37 | 38 | return /* I18N: Name of a module */ |
38 | 39 | I18N::translate('Clippings cart'); |
39 | 40 | } |
40 | 41 | |
41 | 42 | /** {@inheritdoc} */ |
42 | - public function getDescription() { |
|
43 | + public function getDescription() |
|
44 | + { |
|
43 | 45 | return /* I18N: Description of the “Clippings cart” module */ |
44 | 46 | I18N::translate('Select records from your family tree and save them as a GEDCOM file.'); |
45 | 47 | } |
@@ -51,7 +53,8 @@ discard block |
||
51 | 53 | * |
52 | 54 | * @return int |
53 | 55 | */ |
54 | - public function defaultAccessLevel() { |
|
56 | + public function defaultAccessLevel() |
|
57 | + { |
|
55 | 58 | return Auth::PRIV_USER; |
56 | 59 | } |
57 | 60 | |
@@ -61,7 +64,8 @@ discard block |
||
61 | 64 | * |
62 | 65 | * @param string $mod_action |
63 | 66 | */ |
64 | - public function modAction($mod_action) { |
|
67 | + public function modAction($mod_action) |
|
68 | + { |
|
65 | 69 | global $WT_TREE; |
66 | 70 | |
67 | 71 | // Only allow access if either the menu or sidebar is enabled. |
@@ -555,7 +559,8 @@ discard block |
||
555 | 559 | * |
556 | 560 | * @return int |
557 | 561 | */ |
558 | - public function defaultMenuOrder() { |
|
562 | + public function defaultMenuOrder() |
|
563 | + { |
|
559 | 564 | return 20; |
560 | 565 | } |
561 | 566 | |
@@ -564,7 +569,8 @@ discard block |
||
564 | 569 | * |
565 | 570 | * @return Menu|null |
566 | 571 | */ |
567 | - public function getMenu() { |
|
572 | + public function getMenu() |
|
573 | + { |
|
568 | 574 | global $controller, $WT_TREE; |
569 | 575 | |
570 | 576 | $submenus = array(); |
@@ -583,12 +589,14 @@ discard block |
||
583 | 589 | } |
584 | 590 | |
585 | 591 | /** {@inheritdoc} */ |
586 | - public function defaultSidebarOrder() { |
|
592 | + public function defaultSidebarOrder() |
|
593 | + { |
|
587 | 594 | return 60; |
588 | 595 | } |
589 | 596 | |
590 | 597 | /** {@inheritdoc} */ |
591 | - public function hasSidebarContent() { |
|
598 | + public function hasSidebarContent() |
|
599 | + { |
|
592 | 600 | // Creating a controller has the side effect of initialising the cart |
593 | 601 | new ClippingsCartController; |
594 | 602 | |
@@ -600,7 +608,8 @@ discard block |
||
600 | 608 | * |
601 | 609 | * @return string |
602 | 610 | */ |
603 | - public function getSidebarContent() { |
|
611 | + public function getSidebarContent() |
|
612 | + { |
|
604 | 613 | global $controller; |
605 | 614 | |
606 | 615 | $controller->addInlineJavascript(' |
@@ -614,7 +623,8 @@ discard block |
||
614 | 623 | } |
615 | 624 | |
616 | 625 | /** {@inheritdoc} */ |
617 | - public function getSidebarAjaxContent() { |
|
626 | + public function getSidebarAjaxContent() |
|
627 | + { |
|
618 | 628 | global $WT_TREE; |
619 | 629 | |
620 | 630 | $cart = Session::get('cart'); |
@@ -678,7 +688,8 @@ discard block |
||
678 | 688 | * |
679 | 689 | * @return string |
680 | 690 | */ |
681 | - public function getCartList() { |
|
691 | + public function getCartList() |
|
692 | + { |
|
682 | 693 | global $WT_TREE; |
683 | 694 | |
684 | 695 | $cart = Session::get('cart', array()); |
@@ -747,7 +758,8 @@ discard block |
||
747 | 758 | * |
748 | 759 | * @return string |
749 | 760 | */ |
750 | - public function downloadForm(ClippingsCartController $clip_ctrl) { |
|
761 | + public function downloadForm(ClippingsCartController $clip_ctrl) |
|
762 | + { |
|
751 | 763 | global $WT_TREE; |
752 | 764 | |
753 | 765 | $pid = Filter::get('pid', WT_REGEX_XREF); |
@@ -27,13 +27,15 @@ discard block |
||
27 | 27 | /** |
28 | 28 | * Class TopSurnamesModule |
29 | 29 | */ |
30 | -class TopSurnamesModule extends AbstractModule implements ModuleBlockInterface { |
|
30 | +class TopSurnamesModule extends AbstractModule implements ModuleBlockInterface |
|
31 | +{ |
|
31 | 32 | /** |
32 | 33 | * How should this module be labelled on tabs, menus, etc.? |
33 | 34 | * |
34 | 35 | * @return string |
35 | 36 | */ |
36 | - public function getTitle() { |
|
37 | + public function getTitle() |
|
38 | + { |
|
37 | 39 | return /* I18N: Name of a module. Top=Most common */ I18N::translate('Top surnames'); |
38 | 40 | } |
39 | 41 | |
@@ -42,7 +44,8 @@ discard block |
||
42 | 44 | * |
43 | 45 | * @return string |
44 | 46 | */ |
45 | - public function getDescription() { |
|
47 | + public function getDescription() |
|
48 | + { |
|
46 | 49 | return /* I18N: Description of the “Top surnames” module */ I18N::translate('A list of the most popular surnames.'); |
47 | 50 | } |
48 | 51 | |
@@ -55,7 +58,8 @@ discard block |
||
55 | 58 | * |
56 | 59 | * @return string |
57 | 60 | */ |
58 | - public function getBlock($block_id, $template = true, $cfg = array()) { |
|
61 | + public function getBlock($block_id, $template = true, $cfg = array()) |
|
62 | + { |
|
59 | 63 | global $WT_TREE, $ctype; |
60 | 64 | |
61 | 65 | $num = $this->getBlockSetting($block_id, 'num', '10'); |
@@ -125,17 +129,20 @@ discard block |
||
125 | 129 | } |
126 | 130 | |
127 | 131 | /** {@inheritdoc} */ |
128 | - public function loadAjax() { |
|
132 | + public function loadAjax() |
|
133 | + { |
|
129 | 134 | return true; |
130 | 135 | } |
131 | 136 | |
132 | 137 | /** {@inheritdoc} */ |
133 | - public function isUserBlock() { |
|
138 | + public function isUserBlock() |
|
139 | + { |
|
134 | 140 | return true; |
135 | 141 | } |
136 | 142 | |
137 | 143 | /** {@inheritdoc} */ |
138 | - public function isGedcomBlock() { |
|
144 | + public function isGedcomBlock() |
|
145 | + { |
|
139 | 146 | return true; |
140 | 147 | } |
141 | 148 | |
@@ -144,7 +151,8 @@ discard block |
||
144 | 151 | * |
145 | 152 | * @param int $block_id |
146 | 153 | */ |
147 | - public function configureBlock($block_id) { |
|
154 | + public function configureBlock($block_id) |
|
155 | + { |
|
148 | 156 | if (Filter::postBool('save') && Filter::checkCsrf()) { |
149 | 157 | $this->setBlockSetting($block_id, 'num', Filter::postInteger('num', 1, 10000, 10)); |
150 | 158 | $this->setBlockSetting($block_id, 'infoStyle', Filter::post('infoStyle', 'list|array|table|tagcloud', 'table')); |
@@ -174,7 +182,8 @@ discard block |
||
174 | 182 | * |
175 | 183 | * @return int |
176 | 184 | */ |
177 | - private static function surnameCountSort($a, $b) { |
|
185 | + private static function surnameCountSort($a, $b) |
|
186 | + { |
|
178 | 187 | $counta = 0; |
179 | 188 | foreach ($a as $x) { |
180 | 189 | $counta += count($x); |
@@ -22,15 +22,18 @@ discard block |
||
22 | 22 | /** |
23 | 23 | * Class MarriageReportModule |
24 | 24 | */ |
25 | -class MarriageReportModule extends AbstractModule implements ModuleReportInterface { |
|
25 | +class MarriageReportModule extends AbstractModule implements ModuleReportInterface |
|
26 | +{ |
|
26 | 27 | /** {@inheritdoc} */ |
27 | - public function getTitle() { |
|
28 | + public function getTitle() |
|
29 | + { |
|
28 | 30 | // This text also appears in the .XML file - update both together |
29 | 31 | return /* I18N: Name of a module/report */ I18N::translate('Marriages'); |
30 | 32 | } |
31 | 33 | |
32 | 34 | /** {@inheritdoc} */ |
33 | - public function getDescription() { |
|
35 | + public function getDescription() |
|
36 | + { |
|
34 | 37 | // This text also appears in the .XML file - update both together |
35 | 38 | return /* I18N: Description of the “Marriages” module */ I18N::translate('A report of individuals who were married in a given time or place.'); |
36 | 39 | } |
@@ -42,7 +45,8 @@ discard block |
||
42 | 45 | * |
43 | 46 | * @return int |
44 | 47 | */ |
45 | - public function defaultAccessLevel() { |
|
48 | + public function defaultAccessLevel() |
|
49 | + { |
|
46 | 50 | return Auth::PRIV_PRIVATE; |
47 | 51 | } |
48 | 52 | |
@@ -51,7 +55,8 @@ discard block |
||
51 | 55 | * |
52 | 56 | * @return Menu |
53 | 57 | */ |
54 | - public function getReportMenu() { |
|
58 | + public function getReportMenu() |
|
59 | + { |
|
55 | 60 | global $WT_TREE; |
56 | 61 | |
57 | 62 | return new Menu( |
@@ -24,33 +24,39 @@ discard block |
||
24 | 24 | /** |
25 | 25 | * Class FamilyNavigatorModule |
26 | 26 | */ |
27 | -class FamilyNavigatorModule extends AbstractModule implements ModuleSidebarInterface { |
|
27 | +class FamilyNavigatorModule extends AbstractModule implements ModuleSidebarInterface |
|
28 | +{ |
|
28 | 29 | const TTL = "<div class='flyout2'>%s</div>"; |
29 | 30 | const LNK = "<div class='flyout3' data-href='%s'>%s</div>"; |
30 | 31 | const MSG = "<div class='flyout4'>(%s)</div>"; // class flyout4 not used in standard themes |
31 | 32 | |
32 | 33 | /** {@inheritdoc} */ |
33 | - public function getTitle() { |
|
34 | + public function getTitle() |
|
35 | + { |
|
34 | 36 | return /* I18N: Name of a module/sidebar */ I18N::translate('Family navigator'); |
35 | 37 | } |
36 | 38 | |
37 | 39 | /** {@inheritdoc} */ |
38 | - public function getDescription() { |
|
40 | + public function getDescription() |
|
41 | + { |
|
39 | 42 | return /* I18N: Description of the “Family navigator” module */ I18N::translate('A sidebar showing an individual’s close families and relatives.'); |
40 | 43 | } |
41 | 44 | |
42 | 45 | /** {@inheritdoc} */ |
43 | - public function defaultSidebarOrder() { |
|
46 | + public function defaultSidebarOrder() |
|
47 | + { |
|
44 | 48 | return 20; |
45 | 49 | } |
46 | 50 | |
47 | 51 | /** {@inheritdoc} */ |
48 | - public function hasSidebarContent() { |
|
52 | + public function hasSidebarContent() |
|
53 | + { |
|
49 | 54 | return true; |
50 | 55 | } |
51 | 56 | |
52 | 57 | /** {@inheritdoc} */ |
53 | - public function getSidebarAjaxContent() { |
|
58 | + public function getSidebarAjaxContent() |
|
59 | + { |
|
54 | 60 | return ''; |
55 | 61 | } |
56 | 62 | |
@@ -59,7 +65,8 @@ discard block |
||
59 | 65 | * |
60 | 66 | * @return string |
61 | 67 | */ |
62 | - public function getSidebarContent() { |
|
68 | + public function getSidebarContent() |
|
69 | + { |
|
63 | 70 | global $controller; |
64 | 71 | |
65 | 72 | $controller->addInlineJavascript(' |
@@ -110,7 +117,8 @@ discard block |
||
110 | 117 | * @param Family $family |
111 | 118 | * @param string $title |
112 | 119 | */ |
113 | - private function drawFamily(Family $family, $title) { |
|
120 | + private function drawFamily(Family $family, $title) |
|
121 | + { |
|
114 | 122 | global $controller; |
115 | 123 | |
116 | 124 | ?> |
@@ -139,8 +147,11 @@ discard block |
||
139 | 147 | <div class="font9"> |
140 | 148 | <?php echo $spouse->getLifeSpan(); ?> |
141 | 149 | </div> |
142 | - <?php else: ?> |
|
143 | - <?php echo $spouse->getFullName(); ?> |
|
150 | + <?php else { |
|
151 | + : ?> |
|
152 | + <?php echo $spouse->getFullName(); |
|
153 | +} |
|
154 | +?> |
|
144 | 155 | <?php endif; ?> |
145 | 156 | </td> |
146 | 157 | </tr> |
@@ -164,8 +175,11 @@ discard block |
||
164 | 175 | <div class="font9"> |
165 | 176 | <?php echo $child->getLifeSpan(); ?> |
166 | 177 | </div> |
167 | - <?php else: ?> |
|
168 | - <?php echo $child->getFullName(); ?> |
|
178 | + <?php else { |
|
179 | + : ?> |
|
180 | + <?php echo $child->getFullName(); |
|
181 | +} |
|
182 | +?> |
|
169 | 183 | <?php endif; ?> |
170 | 184 | </td> |
171 | 185 | </tr> |
@@ -181,7 +195,8 @@ discard block |
||
181 | 195 | * |
182 | 196 | * @return string |
183 | 197 | */ |
184 | - private function getHTML($person, $showUnknown = false) { |
|
198 | + private function getHTML($person, $showUnknown = false) |
|
199 | + { |
|
185 | 200 | if ($person instanceof Individual) { |
186 | 201 | return sprintf(self::LNK, $person->getHtmlUrl(), $person->getFullName()); |
187 | 202 | } elseif ($showUnknown) { |
@@ -198,7 +213,8 @@ discard block |
||
198 | 213 | * |
199 | 214 | * @return string |
200 | 215 | */ |
201 | - private function getParents(Individual $person) { |
|
216 | + private function getParents(Individual $person) |
|
217 | + { |
|
202 | 218 | $father = null; |
203 | 219 | $mother = null; |
204 | 220 | $html = sprintf(self::TTL, I18N::translate('Parents')); |
@@ -240,7 +256,8 @@ discard block |
||
240 | 256 | * |
241 | 257 | * @return string |
242 | 258 | */ |
243 | - private function getFamily(Individual $person) { |
|
259 | + private function getFamily(Individual $person) |
|
260 | + { |
|
244 | 261 | $html = ''; |
245 | 262 | if ($person->canShowName()) { |
246 | 263 | foreach ($person->getSpouseFamilies() as $family) { |
@@ -22,15 +22,18 @@ discard block |
||
22 | 22 | /** |
23 | 23 | * Class BirthReportModule |
24 | 24 | */ |
25 | -class BirthReportModule extends AbstractModule implements ModuleReportInterface { |
|
25 | +class BirthReportModule extends AbstractModule implements ModuleReportInterface |
|
26 | +{ |
|
26 | 27 | /** {@inheritdoc} */ |
27 | - public function getTitle() { |
|
28 | + public function getTitle() |
|
29 | + { |
|
28 | 30 | // This text also appears in the .XML file - update both together |
29 | 31 | return /* I18N: Name of a module/report */ I18N::translate('Births'); |
30 | 32 | } |
31 | 33 | |
32 | 34 | /** {@inheritdoc} */ |
33 | - public function getDescription() { |
|
35 | + public function getDescription() |
|
36 | + { |
|
34 | 37 | // This text also appears in the .XML file - update both together |
35 | 38 | return /* I18N: Description of the “Births” module */ I18N::translate('A report of individuals who were born in a given time or place.'); |
36 | 39 | } |
@@ -42,7 +45,8 @@ discard block |
||
42 | 45 | * |
43 | 46 | * @return int |
44 | 47 | */ |
45 | - public function defaultAccessLevel() { |
|
48 | + public function defaultAccessLevel() |
|
49 | + { |
|
46 | 50 | return Auth::PRIV_PRIVATE; |
47 | 51 | } |
48 | 52 | |
@@ -51,7 +55,8 @@ discard block |
||
51 | 55 | * |
52 | 56 | * @return Menu |
53 | 57 | */ |
54 | - public function getReportMenu() { |
|
58 | + public function getReportMenu() |
|
59 | + { |
|
55 | 60 | global $WT_TREE; |
56 | 61 | |
57 | 62 | return new Menu( |