@@ -28,11 +28,11 @@ discard block |
||
28 | 28 | <div id="maj-sosa-list-page" class="center"> |
29 | 29 | <h2><?php echo $this->data->get('title'); ?></h2> |
30 | 30 | |
31 | - <?php if($this->data->get('is_setup')) { |
|
31 | + <?php if ($this->data->get('is_setup')) { |
|
32 | 32 | $selectedgen = $this->data->get('generation'); |
33 | 33 | $this->renderSosaHeader(); |
34 | - if($this->data->get('has_sosa') ) { |
|
35 | - if($selectedgen > 0) { |
|
34 | + if ($this->data->get('has_sosa')) { |
|
35 | + if ($selectedgen > 0) { |
|
36 | 36 | ?> |
37 | 37 | <div id="sosalist-tabs"> |
38 | 38 | <ul> |
@@ -75,9 +75,9 @@ discard block |
||
75 | 75 | ?> |
76 | 76 | |
77 | 77 | <form method="get" name="setgen" action="module.php"> |
78 | - <input type="hidden" name="mod" value="<?php echo $this->data->get('url_module');?>"> |
|
79 | - <input type="hidden" name="mod_action" value="<?php echo $this->data->get('url_action');?>"> |
|
80 | - <input type="hidden" name="ged" value="<?php echo $this->data->get('url_ged');?>"> |
|
78 | + <input type="hidden" name="mod" value="<?php echo $this->data->get('url_module'); ?>"> |
|
79 | + <input type="hidden" name="mod_action" value="<?php echo $this->data->get('url_action'); ?>"> |
|
80 | + <input type="hidden" name="ged" value="<?php echo $this->data->get('url_ged'); ?>"> |
|
81 | 81 | <div class="maj-table"> |
82 | 82 | <div class="maj-row"> |
83 | 83 | <div class="label"><?php echo I18N::translate('Choose generation') ?></div> |
@@ -85,9 +85,9 @@ discard block |
||
85 | 85 | <div class="maj-row"> |
86 | 86 | <div class="value"> |
87 | 87 | <select name="gen"> |
88 | - <?php for($i=$this->data->get('min_gen'); $i <= $max_gen;$i++) {?> |
|
88 | + <?php for ($i = $this->data->get('min_gen'); $i <= $max_gen; $i++) {?> |
|
89 | 89 | <option value="<?php echo $i; ?>" |
90 | - <?php if($selectedgen && $selectedgen==$i) { ?> selected="true" <?php } ?> |
|
90 | + <?php if ($selectedgen && $selectedgen == $i) { ?> selected="true" <?php } ?> |
|
91 | 91 | ><?php echo I18N::translate('Generation %d', $i); ?> |
92 | 92 | </option> |
93 | 93 | <?php } ?> |
@@ -95,21 +95,21 @@ discard block |
||
95 | 95 | </div> |
96 | 96 | </div> |
97 | 97 | </div> |
98 | - <input type="submit" value="<?php echo I18N::translate('Show');?>" /> |
|
98 | + <input type="submit" value="<?php echo I18N::translate('Show'); ?>" /> |
|
99 | 99 | <br /> |
100 | 100 | </form> |
101 | - <?php if($selectedgen > 0) { ?> |
|
101 | + <?php if ($selectedgen > 0) { ?> |
|
102 | 102 | <h4> |
103 | - <?php if($selectedgen > $this->data->get('min_gen')) { ?> |
|
104 | - <a href="module.php?mod=<?php echo $this->data->get('url_module');?>&mod_action=<?php echo $this->data->get('url_action');?>&ged=<?php echo $this->data->get('url_ged');?>&gen=<?php echo $selectedgen-1; ?>"> |
|
103 | + <?php if ($selectedgen > $this->data->get('min_gen')) { ?> |
|
104 | + <a href="module.php?mod=<?php echo $this->data->get('url_module'); ?>&mod_action=<?php echo $this->data->get('url_action'); ?>&ged=<?php echo $this->data->get('url_ged'); ?>&gen=<?php echo $selectedgen - 1; ?>"> |
|
105 | 105 | <i class="icon-ldarrow" title="<?php echo I18N::translate('Previous generation'); ?>" ></i> |
106 | 106 | </a> |
107 | 107 | |
108 | 108 | <?php } ?> |
109 | 109 | <?php echo I18N::translate('Generation %d', $selectedgen); ?> |
110 | - <?php if($selectedgen < $max_gen) { ?> |
|
110 | + <?php if ($selectedgen < $max_gen) { ?> |
|
111 | 111 | |
112 | - <a href="module.php?mod=<?php echo $this->data->get('url_module');?>&mod_action=<?php echo $this->data->get('url_action');?>&ged=<?php echo $this->data->get('url_ged');?>&gen=<?php echo $selectedgen+1; ?>"> |
|
112 | + <a href="module.php?mod=<?php echo $this->data->get('url_module'); ?>&mod_action=<?php echo $this->data->get('url_action'); ?>&ged=<?php echo $this->data->get('url_ged'); ?>&gen=<?php echo $selectedgen + 1; ?>"> |
|
113 | 113 | <i class="icon-rdarrow" title="<?php echo I18N::translate('Next generation'); ?>" ></i> |
114 | 114 | </a> |
115 | 115 | <?php } ?> |
@@ -25,14 +25,14 @@ |
||
25 | 25 | */ |
26 | 26 | protected function renderContent() { |
27 | 27 | |
28 | - if($this->data->get('is_success', false)) { |
|
28 | + if ($this->data->get('is_success', false)) { |
|
29 | 29 | ?> |
30 | 30 | <i class="icon-maj-success" title="<?php echo I18N::translate('Success'); ?>"></i> |
31 | 31 | <?php echo I18N::translate('Success'); ?> |
32 | 32 | <?php } else { ?> |
33 | 33 | <i class="icon-maj-error" title="<?php echo I18N::translate('Error'); ?>"></i> |
34 | 34 | <?php echo I18N::translate('Error'); ?> |
35 | - <?php if($error = $this->data->get('error')) { echo ' - ' . $error; } |
|
35 | + <?php if ($error = $this->data->get('error')) { echo ' - '.$error; } |
|
36 | 36 | } |
37 | 37 | } |
38 | 38 |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | $view_bag->set('title', $controller->getPageTitle()); |
65 | 65 | $view_bag->set('is_setup', false); |
66 | 66 | |
67 | - if($this->sosa_provider->isSetup()) { |
|
67 | + if ($this->sosa_provider->isSetup()) { |
|
68 | 68 | $view_bag->set('is_setup', true); |
69 | 69 | |
70 | 70 | $sosaCount = $this->sosa_provider->getSosaCount(); |
@@ -82,23 +82,23 @@ discard block |
||
82 | 82 | $stats_gen = $this->sosa_provider->getStatisticsByGeneration(); |
83 | 83 | $view_bag->set('missinganc_url', 'module.php?mod='.$this->module->getName().'&mod_action=SosaList@missing&ged='.$WT_TREE->getNameUrl().'&gen='); |
84 | 84 | |
85 | - $gen_theoretical=1; |
|
86 | - $total_theoretical=0; |
|
87 | - $prev_diff=0; |
|
88 | - $prev_known=0.5; |
|
89 | - $gen_equiv=0; |
|
85 | + $gen_theoretical = 1; |
|
86 | + $total_theoretical = 0; |
|
87 | + $prev_diff = 0; |
|
88 | + $prev_known = 0.5; |
|
89 | + $gen_equiv = 0; |
|
90 | 90 | $generation_stats = array(); |
91 | 91 | |
92 | - foreach($stats_gen as $gen => $tab){ |
|
93 | - $genY1= I18N::translate('-'); |
|
94 | - $genY2= I18N::translate('-'); |
|
95 | - if($tab['firstBirth']>0) $genY1=$tab['firstBirth']; |
|
96 | - if($tab['lastBirth']>0) $genY2=$tab['lastBirth']; |
|
92 | + foreach ($stats_gen as $gen => $tab) { |
|
93 | + $genY1 = I18N::translate('-'); |
|
94 | + $genY2 = I18N::translate('-'); |
|
95 | + if ($tab['firstBirth'] > 0) $genY1 = $tab['firstBirth']; |
|
96 | + if ($tab['lastBirth'] > 0) $genY2 = $tab['lastBirth']; |
|
97 | 97 | $total_theoretical += $gen_theoretical; |
98 | 98 | $perc_sosa_count_theor = Functions::safeDivision($tab['sosaCount'], $gen_theoretical); |
99 | 99 | $gen_equiv += $perc_sosa_count_theor; |
100 | - $missing=2*$prev_known - $tab['sosaCount']; |
|
101 | - $gen_diff=$tab['diffSosaTotalCount']-$prev_diff; |
|
100 | + $missing = 2 * $prev_known - $tab['sosaCount']; |
|
101 | + $gen_diff = $tab['diffSosaTotalCount'] - $prev_diff; |
|
102 | 102 | |
103 | 103 | $generation_stats[$gen] = array( |
104 | 104 | 'gen_min_birth' => $genY1, |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | 'known' => $tab['sosaCount'], |
108 | 108 | 'perc_known' => $perc_sosa_count_theor, |
109 | 109 | 'missing' => $missing, |
110 | - 'perc_missing' => 1-Functions::safeDivision($tab['sosaCount'], 2*$prev_known), |
|
110 | + 'perc_missing' => 1 - Functions::safeDivision($tab['sosaCount'], 2 * $prev_known), |
|
111 | 111 | 'total_known' => $tab['sosaTotalCount'], |
112 | 112 | 'perc_total_known' => Functions::safeDivision($tab['sosaTotalCount'], $total_theoretical), |
113 | 113 | 'different' => $gen_diff, |
@@ -117,8 +117,8 @@ discard block |
||
117 | 117 | ); |
118 | 118 | |
119 | 119 | $gen_theoretical = $gen_theoretical * 2; |
120 | - $prev_known=$tab['sosaCount']; |
|
121 | - $prev_diff=$tab['diffSosaTotalCount']; |
|
120 | + $prev_known = $tab['sosaCount']; |
|
121 | + $prev_diff = $tab['diffSosaTotalCount']; |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | $view_bag->set('generation_stats', $generation_stats); |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | private function htmlAncestorDispersionG2() |
140 | 140 | { |
141 | 141 | $ancestorsDispGen2 = $this->sosa_provider->getAncestorDispersionForGen(2); |
142 | - if(count($ancestorsDispGen2) == 0) return; |
|
142 | + if (count($ancestorsDispGen2) == 0) return; |
|
143 | 143 | |
144 | 144 | $size = '600x300'; |
145 | 145 | $sizes = explode('x', $size); |
@@ -150,21 +150,21 @@ discard block |
||
150 | 150 | |
151 | 151 | $total = array_sum($ancestorsDispGen2); |
152 | 152 | $father_count = isset($ancestorsDispGen2[1]) ? $ancestorsDispGen2[1] : 0; |
153 | - $father = array ( |
|
153 | + $father = array( |
|
154 | 154 | 'color' => '84beff', |
155 | 155 | 'count' => $father_count, |
156 | 156 | 'perc' => Functions::safeDivision($father_count, $total), |
157 | 157 | 'name' => \Fisharebest\Webtrees\Functions\Functions::getRelationshipNameFromPath('fat') |
158 | 158 | ); |
159 | 159 | $mother_count = isset($ancestorsDispGen2[2]) ? $ancestorsDispGen2[2] : 0; |
160 | - $mother = array ( |
|
160 | + $mother = array( |
|
161 | 161 | 'color' => 'ffd1dc', |
162 | 162 | 'count' => $mother_count, |
163 | 163 | 'perc' => Functions::safeDivision($mother_count, $total), |
164 | 164 | 'name' => \Fisharebest\Webtrees\Functions\Functions::getRelationshipNameFromPath('mot') |
165 | 165 | ); |
166 | 166 | $shared_count = isset($ancestorsDispGen2[-1]) ? $ancestorsDispGen2[-1] : 0; |
167 | - $shared = array ( |
|
167 | + $shared = array( |
|
168 | 168 | 'color' => '777777', |
169 | 169 | 'count' => $shared_count, |
170 | 170 | 'perc' => Functions::safeDivision($shared_count, $total), |
@@ -174,10 +174,10 @@ discard block |
||
174 | 174 | $chd = $this->arrayToExtendedEncoding(array(4095 * $father['perc'], 4095 * $shared['perc'], 4095 * $mother['perc'])); |
175 | 175 | $chart_title = I18N::translate('Known Sosa ancestors\' dispersion'); |
176 | 176 | $chl = |
177 | - $father['name'] . ' - ' . I18N::percentage($father['perc'], 1) . '|' . |
|
178 | - $shared['name'] . ' - ' . I18N::percentage($shared['perc'], 1) . '|' . |
|
179 | - $mother['name'] . ' - ' . I18N::percentage($mother['perc'], 1); |
|
180 | - return "<img src=\"https://chart.googleapis.com/chart?cht=p&chp=1.5708&chd=e:{$chd}&chs={$size}&chco={$father['color']},{$shared['color']},{$mother['color']}&chf=bg,s,ffffff00&chl={$chl}\" alt=\"" . $chart_title . "\" title=\"" . $chart_title . "\" />"; |
|
177 | + $father['name'].' - '.I18N::percentage($father['perc'], 1).'|'. |
|
178 | + $shared['name'].' - '.I18N::percentage($shared['perc'], 1).'|'. |
|
179 | + $mother['name'].' - '.I18N::percentage($mother['perc'], 1); |
|
180 | + return "<img src=\"https://chart.googleapis.com/chart?cht=p&chp=1.5708&chd=e:{$chd}&chs={$size}&chco={$father['color']},{$shared['color']},{$mother['color']}&chf=bg,s,ffffff00&chl={$chl}\" alt=\"".$chart_title."\" title=\"".$chart_title."\" />"; |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | /** |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | $total_motfat = $ancestorsDispGen2[4] ?: 0; |
202 | 202 | $total_motmot = $ancestorsDispGen2[8] ?: 0; |
203 | 203 | $total_sha = $ancestorsDispGen2[-1] ?: 0; |
204 | - $total = $total_fatfat + $total_fatmot + $total_motfat+ $total_motmot + $total_sha; |
|
204 | + $total = $total_fatfat + $total_fatmot + $total_motfat + $total_motmot + $total_sha; |
|
205 | 205 | |
206 | 206 | $chd = $this->arrayToExtendedEncoding(array( |
207 | 207 | 4095 * $total_fatfat / $total, |
@@ -212,12 +212,12 @@ discard block |
||
212 | 212 | )); |
213 | 213 | $chart_title = I18N::translate('Known Sosa ancestors\' dispersion - G3'); |
214 | 214 | $chl = |
215 | - \Fisharebest\Webtrees\Functions\Functions::getRelationshipNameFromPath('fatfat') . ' - ' . I18N::percentage(Functions::safeDivision($total_fatfat, $total), 1) . '|' . |
|
216 | - \Fisharebest\Webtrees\Functions\Functions::getRelationshipNameFromPath('fatmot') . ' - ' . I18N::percentage(Functions::safeDivision($total_fatmot, $total), 1) . '|' . |
|
217 | - I18N::translate('Shared') . ' - ' . I18N::percentage(Functions::safeDivision($total_sha, $total), 1) . '|' . |
|
218 | - \Fisharebest\Webtrees\Functions\Functions::getRelationshipNameFromPath('motfat') . ' - ' . I18N::percentage(Functions::safeDivision($total_motfat, $total), 1) . '|' . |
|
219 | - \Fisharebest\Webtrees\Functions\Functions::getRelationshipNameFromPath('motmot') . ' - ' . I18N::percentage(Functions::safeDivision($total_motmot, $total), 1); |
|
220 | - return "<img src=\"https://chart.googleapis.com/chart?cht=p&chp=1.5708&chd=e:{$chd}&chs={$size}&chco={$color_fatfat},{$color_fatmot},{$color_shared},{$color_motfat},{$color_motmot}&chf=bg,s,ffffff00&chl={$chl}\" alt=\"" . $chart_title . "\" title=\"" . $chart_title . "\" />"; |
|
215 | + \Fisharebest\Webtrees\Functions\Functions::getRelationshipNameFromPath('fatfat').' - '.I18N::percentage(Functions::safeDivision($total_fatfat, $total), 1).'|'. |
|
216 | + \Fisharebest\Webtrees\Functions\Functions::getRelationshipNameFromPath('fatmot').' - '.I18N::percentage(Functions::safeDivision($total_fatmot, $total), 1).'|'. |
|
217 | + I18N::translate('Shared').' - '.I18N::percentage(Functions::safeDivision($total_sha, $total), 1).'|'. |
|
218 | + \Fisharebest\Webtrees\Functions\Functions::getRelationshipNameFromPath('motfat').' - '.I18N::percentage(Functions::safeDivision($total_motfat, $total), 1).'|'. |
|
219 | + \Fisharebest\Webtrees\Functions\Functions::getRelationshipNameFromPath('motmot').' - '.I18N::percentage(Functions::safeDivision($total_motmot, $total), 1); |
|
220 | + return "<img src=\"https://chart.googleapis.com/chart?cht=p&chp=1.5708&chd=e:{$chd}&chs={$size}&chco={$color_fatfat},{$color_fatmot},{$color_shared},{$color_motfat},{$color_motmot}&chf=bg,s,ffffff00&chl={$chl}\" alt=\"".$chart_title."\" title=\"".$chart_title."\" />"; |
|
221 | 221 | } |
222 | 222 | |
223 | 223 | /** |
@@ -233,9 +233,9 @@ discard block |
||
233 | 233 | if ($value < 0) { |
234 | 234 | $value = 0; |
235 | 235 | } |
236 | - $first = (int) ($value / 64); |
|
236 | + $first = (int)($value / 64); |
|
237 | 237 | $second = $value % 64; |
238 | - $encoding .= $xencoding[(int) $first] . $xencoding[(int) $second]; |
|
238 | + $encoding .= $xencoding[(int)$first].$xencoding[(int)$second]; |
|
239 | 239 | } |
240 | 240 | |
241 | 241 | return $encoding; |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | * @param Fisharebest\Webtrees\Family $fams |
58 | 58 | */ |
59 | 59 | public function addFamily(Family $fams) { |
60 | - if($fams && !isset($this->linked_fams[$fams])) { |
|
60 | + if ($fams && !isset($this->linked_fams[$fams])) { |
|
61 | 61 | $this->linked_fams[$fams] = array(); |
62 | 62 | } |
63 | 63 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | * @param LineageNode $child |
70 | 70 | */ |
71 | 71 | public function addChild(Family $fams, LineageNode $child = null) { |
72 | - if($fams) { |
|
72 | + if ($fams) { |
|
73 | 73 | $this->addFamily($fams); |
74 | 74 | $tmp = $this->linked_fams[$fams]; |
75 | 75 | $tmp[] = $child; |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | * @return boolean |
120 | 120 | */ |
121 | 121 | public function hasFollowUpSurname() { |
122 | - return !is_null($this->alt_surname) && strlen($this->alt_surname) > 0 ; |
|
122 | + return !is_null($this->alt_surname) && strlen($this->alt_surname) > 0; |
|
123 | 123 | } |
124 | 124 | |
125 | 125 | } |
@@ -37,12 +37,12 @@ |
||
37 | 37 | * @param Place $place |
38 | 38 | */ |
39 | 39 | public function addPlace(Place $place) { |
40 | - if(!is_null($place) && !$place->isEmpty()){ |
|
40 | + if (!is_null($place) && !$place->isEmpty()) { |
|
41 | 41 | $place_name = $place->getFullName(); |
42 | - if(isset($this->places[$place_name])){ |
|
43 | - $this->places[$place_name]+=1; |
|
42 | + if (isset($this->places[$place_name])) { |
|
43 | + $this->places[$place_name] += 1; |
|
44 | 44 | } |
45 | - else{ |
|
45 | + else { |
|
46 | 46 | $this->places[$place_name] = 1; |
47 | 47 | } |
48 | 48 | } |
@@ -92,14 +92,14 @@ discard block |
||
92 | 92 | $this->show = 'lineage'; // SURN list makes no sense here |
93 | 93 | } elseif ($this->alpha) { |
94 | 94 | $this->show_all = 'no'; |
95 | - $this->legend = Filter::escapeHtml($this->alpha) . '…'; |
|
95 | + $this->legend = Filter::escapeHtml($this->alpha).'…'; |
|
96 | 96 | $this->show = Filter::get('show', 'surn|lineage', 'surn'); |
97 | 97 | } else { |
98 | 98 | $this->show_all = 'no'; |
99 | 99 | $this->legend = '…'; |
100 | 100 | $this->show = 'none'; // Don't show lists until something is chosen |
101 | 101 | } |
102 | - $this->legend = '<span dir="auto">' . $this->legend . '</span>'; |
|
102 | + $this->legend = '<span dir="auto">'.$this->legend.'</span>'; |
|
103 | 103 | |
104 | 104 | } |
105 | 105 | |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | global $WT_TREE; |
153 | 153 | |
154 | 154 | $controller = new PageController(); |
155 | - $controller->setPageTitle(I18N::translate('Patronymic Lineages') . ' : ' . $this->legend); |
|
155 | + $controller->setPageTitle(I18N::translate('Patronymic Lineages').' : '.$this->legend); |
|
156 | 156 | |
157 | 157 | $view_bag = new ViewBag(); |
158 | 158 | $view_bag->set('title', $controller->getPageTitle()); |
@@ -161,15 +161,15 @@ discard block |
||
161 | 161 | $view_bag->set('surname', $this->surname); |
162 | 162 | $view_bag->set('legend', $this->legend); |
163 | 163 | $view_bag->set('show_all', $this->show_all); |
164 | - if($this->isShowingSurnames()) { |
|
164 | + if ($this->isShowingSurnames()) { |
|
165 | 165 | $view_bag->set('issurnames', true); |
166 | 166 | $view_bag->set('surnameslist', $this->getSurnamesList()); |
167 | 167 | } |
168 | - if($this->isShowingLineages()) { |
|
168 | + if ($this->isShowingLineages()) { |
|
169 | 169 | $view_bag->set('islineages', true); |
170 | 170 | $view_bag->set('lineages', $this->getLineages()); |
171 | 171 | |
172 | - if ($this->show_all==='no') { |
|
172 | + if ($this->show_all === 'no') { |
|
173 | 173 | $view_bag->set('table_title', I18N::translate('Individuals in %s lineages', $this->legend)); |
174 | 174 | } |
175 | 175 | else { |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | public function getConfigLink() { |
78 | 78 | Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION); |
79 | 79 | |
80 | - return 'module.php?mod=' . $this->getName() . '&mod_action=SosaConfig'; |
|
80 | + return 'module.php?mod='.$this->getName().'&mod_action=SosaConfig'; |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | /********** |
@@ -100,17 +100,17 @@ discard block |
||
100 | 100 | global $WT_TREE, $controller; |
101 | 101 | |
102 | 102 | $menu = null; |
103 | - if(ModuleManager::getInstance()->isOperational($this->getName())) { |
|
103 | + if (ModuleManager::getInstance()->isOperational($this->getName())) { |
|
104 | 104 | |
105 | - $root_url = 'module.php?mod=' . $this->getName() . '&ged=' . $WT_TREE->getNameUrl() . '&'; |
|
106 | - $sosa_stat_menu = new Menu(I18N::translate('Sosa Statistics'), $root_url . 'mod_action=SosaStats', 'menu-maj-sosa-stats'); |
|
105 | + $root_url = 'module.php?mod='.$this->getName().'&ged='.$WT_TREE->getNameUrl().'&'; |
|
106 | + $sosa_stat_menu = new Menu(I18N::translate('Sosa Statistics'), $root_url.'mod_action=SosaStats', 'menu-maj-sosa-stats'); |
|
107 | 107 | |
108 | 108 | $menu = clone $sosa_stat_menu; |
109 | 109 | $menu->setClass('menu-maj-sosa'); |
110 | 110 | |
111 | 111 | $submenus = array_filter(array( |
112 | - new Menu(I18N::translate('Sosa Ancestors'), $root_url . 'mod_action=SosaList', 'menu-maj-sosa-list', array('rel' => 'nofollow')), |
|
113 | - new Menu(I18N::translate('Missing Ancestors'), $root_url . 'mod_action=SosaList@missing', 'menu-maj-sosa-missing', array('rel' => 'nofollow')), |
|
112 | + new Menu(I18N::translate('Sosa Ancestors'), $root_url.'mod_action=SosaList', 'menu-maj-sosa-list', array('rel' => 'nofollow')), |
|
113 | + new Menu(I18N::translate('Missing Ancestors'), $root_url.'mod_action=SosaList@missing', 'menu-maj-sosa-missing', array('rel' => 'nofollow')), |
|
114 | 114 | $sosa_stat_menu |
115 | 115 | )); |
116 | 116 | |
@@ -119,12 +119,12 @@ discard block |
||
119 | 119 | && $ga_list = Module::getModuleByName(Constants::MODULE_MAJ_GEODISP_NAME)->getProvider()->getGeoAnalysisList() |
120 | 120 | ) |
121 | 121 | { |
122 | - if(count($ga_list) > 0) { |
|
123 | - $submenus[] = new Menu(I18N::translate('Geographical Dispersion'), 'module.php?mod=' . Constants::MODULE_MAJ_GEODISP_NAME . '&ged=' . $WT_TREE->getNameUrl() . '&mod_action=GeoAnalysis@listAll', 'menu-maj-sosa-geodispersion'); |
|
122 | + if (count($ga_list) > 0) { |
|
123 | + $submenus[] = new Menu(I18N::translate('Geographical Dispersion'), 'module.php?mod='.Constants::MODULE_MAJ_GEODISP_NAME.'&ged='.$WT_TREE->getNameUrl().'&mod_action=GeoAnalysis@listAll', 'menu-maj-sosa-geodispersion'); |
|
124 | 124 | } |
125 | 125 | } |
126 | 126 | |
127 | - if(Auth::check()) { |
|
127 | + if (Auth::check()) { |
|
128 | 128 | $submenus[] = new Menu( |
129 | 129 | I18N::translate('Sosa Configuration'), |
130 | 130 | $this->getConfigLink(), |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | ->addInlineJavascript(' |
141 | 141 | function majComputeSosaFromIndi(){ |
142 | 142 | if($("#computesosadlg").length == 0) { |
143 | - $("body").append("<div id=\"computesosadlg\" title=\"'. I18N::translate('Sosas computation') .'\"><div id=\"sosaloadingarea\"></div></div>"); |
|
143 | + $("body").append("<div id=\"computesosadlg\" title=\"'. I18N::translate('Sosas computation').'\"><div id=\"sosaloadingarea\"></div></div>"); |
|
144 | 144 | } |
145 | 145 | $("#computesosadlg").dialog({ |
146 | 146 | modal: true, |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | open: function(event, ui) { |
150 | 150 | $("button.ui-dialog-titlebar-close").hide(); |
151 | 151 | $("#sosaloadingarea").empty().html("<i class=\"icon-loading-small\"></i>"); |
152 | - $("#sosaloadingarea").load("module.php?mod=' . $this->getName() . '&mod_action=SosaConfig@computePartial&ged='. $WT_TREE->getNameUrl() .'&userid='.Auth::user()->getUserId().'&pid=' . $controller->getSignificantIndividual()->getXref() . '", |
|
152 | + $("#sosaloadingarea").load("module.php?mod=' . $this->getName().'&mod_action=SosaConfig@computePartial&ged='.$WT_TREE->getNameUrl().'&userid='.Auth::user()->getUserId().'&pid='.$controller->getSignificantIndividual()->getXref().'", |
|
153 | 153 | function(){ |
154 | 154 | $("button.ui-dialog-titlebar-close").show(); |
155 | 155 | setTimeout(function(){ |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\IndividualHeaderExtender::hExtendIndiHeaderIcons() |
200 | 200 | */ |
201 | 201 | public function hExtendIndiHeaderIcons(IndividualController $ctrlIndi) { |
202 | - if($ctrlIndi){ |
|
202 | + if ($ctrlIndi) { |
|
203 | 203 | $dindi = new Individual($ctrlIndi->getSignificantIndividual()); |
204 | 204 | return FunctionsPrint::formatSosaNumbers($dindi->getSosaNumbers(), 1, 'large'); |
205 | 205 | } |
@@ -217,9 +217,9 @@ discard block |
||
217 | 217 | * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\IndividualHeaderExtender::hExtendIndiHeaderRight() |
218 | 218 | */ |
219 | 219 | public function hExtendIndiHeaderRight(IndividualController $ctrlIndi) { |
220 | - if($ctrlIndi){ |
|
220 | + if ($ctrlIndi) { |
|
221 | 221 | $dindi = new Individual($ctrlIndi->getSignificantIndividual()); |
222 | - return array('indi-header-sosa', FunctionsPrint::formatSosaNumbers($dindi->getSosaNumbers(), 2, 'normal')); |
|
222 | + return array('indi-header-sosa', FunctionsPrint::formatSosaNumbers($dindi->getSosaNumbers(), 2, 'normal')); |
|
223 | 223 | } |
224 | 224 | return ''; |
225 | 225 | } |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | * @see \MyArtJaub\Webtrees\Hook\HookInterfaces\RecordNameTextExtender::hRecordNameAppend() |
230 | 230 | */ |
231 | 231 | public function hRecordNameAppend(GedcomRecord $grec) { |
232 | - if($grec instanceof \Fisharebest\Webtrees\Individual){ // Only apply to individuals |
|
232 | + if ($grec instanceof \Fisharebest\Webtrees\Individual) { // Only apply to individuals |
|
233 | 233 | $dindi = new Individual($grec); |
234 | 234 | return FunctionsPrint::formatSosaNumbers($dindi->getSosaNumbers(), 1, 'small'); |
235 | 235 | } |
@@ -60,13 +60,13 @@ |
||
60 | 60 | ?> |
61 | 61 | <tr> |
62 | 62 | <td> |
63 | - <input type="hidden" name="hook-<?php echo $hook->id;?>" value="yes" > |
|
64 | - <?php echo FunctionsEdit::twoStateCheckbox('status-'.($hook->id), ($hook->status)=='enabled'); ?> |
|
63 | + <input type="hidden" name="hook-<?php echo $hook->id; ?>" value="yes" > |
|
64 | + <?php echo FunctionsEdit::twoStateCheckbox('status-'.($hook->id), ($hook->status) == 'enabled'); ?> |
|
65 | 65 | </td> |
66 | - <td><?php echo (($hook->status)=='enabled'); ?></td> |
|
66 | + <td><?php echo (($hook->status) == 'enabled'); ?></td> |
|
67 | 67 | <td><?php echo $hook->hook; ?></td> |
68 | 68 | <td><?php echo $hook->context; ?></td> |
69 | - <td><?php if($mod = Module::getModuleByName($hook->module)) echo $mod->getTitle(); ?></td> |
|
69 | + <td><?php if ($mod = Module::getModuleByName($hook->module)) echo $mod->getTitle(); ?></td> |
|
70 | 70 | <td><input type="text" class="center" size="2" value="<?php echo $hook->priority; ?>" name="moduleorder-<?php echo $hook->id; ?>" /></td> |
71 | 71 | <td><?php echo $hook->priority; ?></td> |
72 | 72 | </tr> |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | * @see \Fisharebest\Webtrees\Module\ModuleConfigInterface::getConfigLink() |
60 | 60 | */ |
61 | 61 | public function getConfigLink() { |
62 | - return 'module.php?mod=' . $this->getName() . '&mod_action=AdminConfig'; |
|
62 | + return 'module.php?mod='.$this->getName().'&mod_action=AdminConfig'; |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | /** |
@@ -88,19 +88,19 @@ discard block |
||
88 | 88 | $res = ''; |
89 | 89 | $dindi = new Individual($ctrlIndi->getSignificantIndividual()); |
90 | 90 | $titles = $dindi->getTitles(); |
91 | - if(count($titles)>0){ |
|
91 | + if (count($titles) > 0) { |
|
92 | 92 | $res = ' |
93 | 93 | <dl> |
94 | 94 | <dt class="label">'.I18N::translate('Titles').'</dt>'; |
95 | - foreach($titles as $title=>$props){ |
|
95 | + foreach ($titles as $title=>$props) { |
|
96 | 96 | $res .= |
97 | - '<dd class="field">' . $title. ' ' . |
|
98 | - FunctionsPrint::getListFromArray($props) . |
|
97 | + '<dd class="field">'.$title.' '. |
|
98 | + FunctionsPrint::getListFromArray($props). |
|
99 | 99 | '</dd>'; |
100 | 100 | } |
101 | - $res .= '</dl>'; |
|
101 | + $res .= '</dl>'; |
|
102 | 102 | } |
103 | - return array( 'indi-header-titles' , $res); |
|
103 | + return array('indi-header-titles', $res); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -117,8 +117,8 @@ discard block |
||
117 | 117 | global $WT_TREE; |
118 | 118 | |
119 | 119 | $html = ''; |
120 | - if($this->getSetting('MAJ_ADD_HTML_HEADER', 0) == 1){ |
|
121 | - if(Auth::accessLevel($WT_TREE) >= $this->getSetting('MAJ_SHOW_HTML_HEADER', Auth::PRIV_HIDE) && !Filter::getBool('noheader')){ |
|
120 | + if ($this->getSetting('MAJ_ADD_HTML_HEADER', 0) == 1) { |
|
121 | + if (Auth::accessLevel($WT_TREE) >= $this->getSetting('MAJ_SHOW_HTML_HEADER', Auth::PRIV_HIDE) && !Filter::getBool('noheader')) { |
|
122 | 122 | $html .= $this->getSetting('MAJ_HTML_HEADER', ''); |
123 | 123 | } |
124 | 124 | } |
@@ -133,19 +133,19 @@ discard block |
||
133 | 133 | global $WT_TREE; |
134 | 134 | |
135 | 135 | $html = ''; |
136 | - if($this->getSetting('MAJ_DISPLAY_CNIL', 0) == 1){ |
|
136 | + if ($this->getSetting('MAJ_DISPLAY_CNIL', 0) == 1) { |
|
137 | 137 | $html .= '<br/>'; |
138 | 138 | $html .= '<div class="center">'; |
139 | 139 | $cnil_ref = $this->getSetting('MAJ_CNIL_REFERENCE', ''); |
140 | - if($cnil_ref != ''){ |
|
140 | + if ($cnil_ref != '') { |
|
141 | 141 | $html .= I18N::translate('This site has been notified to the French National Commission for Data protection (CNIL) and registered under number %s. ', $cnil_ref); |
142 | 142 | } |
143 | 143 | $html .= I18N::translate('In accordance with the French Data protection Act (<em>Loi Informatique et Libertés</em>) of January 6th, 1978, you have the right to access, modify, rectify and delete personal information that pertains to you. To exercice this right, please contact %s, and provide your name, address and a proof of your identity.', Theme::theme()->contactLink(User::find($WT_TREE->getPreference('WEBMASTER_USER_ID')))); |
144 | 144 | $html .= '</div>'; |
145 | 145 | } |
146 | 146 | |
147 | - if($this->getSetting('MAJ_ADD_HTML_FOOTER', 0) == 1){ |
|
148 | - if(Auth::accessLevel($WT_TREE) >= $this->getSetting('MAJ_SHOW_HTML_FOOTER', Auth::PRIV_HIDE) && !Filter::getBool('nofooter')){ |
|
147 | + if ($this->getSetting('MAJ_ADD_HTML_FOOTER', 0) == 1) { |
|
148 | + if (Auth::accessLevel($WT_TREE) >= $this->getSetting('MAJ_SHOW_HTML_FOOTER', Auth::PRIV_HIDE) && !Filter::getBool('nofooter')) { |
|
149 | 149 | $html .= $this->getSetting('MAJ_HTML_FOOTER', ''); |
150 | 150 | } |
151 | 151 | } |