@@ -79,8 +79,7 @@ |
||
79 | 79 | Database::updateSchema(self::SCHEMA_MIGRATION_PREFIX, self::SCHEMA_SETTING_NAME, self::SCHEMA_TARGET_VERSION); |
80 | 80 | |
81 | 81 | return !is_null(Module::getModuleByName(Constants::MODULE_MAJ_SOSA_NAME)); |
82 | - } |
|
83 | - catch (\Exception $ex) { } |
|
82 | + } catch (\Exception $ex) { } |
|
84 | 83 | return false; |
85 | 84 | } |
86 | 85 |
@@ -93,16 +93,14 @@ |
||
93 | 93 | if(is_int($key)) { |
94 | 94 | $hook_item = $value; |
95 | 95 | $priority = self::DEFAULT_PRIORITY; |
96 | - } |
|
97 | - else{ |
|
96 | + } else{ |
|
98 | 97 | $hook_item = explode('#', $key, 2); |
99 | 98 | $priority = $value; |
100 | 99 | } |
101 | 100 | if($hook_item && count($hook_item) == 2){ |
102 | 101 | $hook_func = $hook_item[0]; |
103 | 102 | $hook_cont = $hook_item[1]; |
104 | - } |
|
105 | - else{ |
|
103 | + } else{ |
|
106 | 104 | $hook_func = $hook_item[0]; |
107 | 105 | $hook_cont = 'all'; |
108 | 106 | } |
@@ -50,7 +50,9 @@ |
||
50 | 50 | |
51 | 51 | if($fetched = File::fetchUrl($url)) { |
52 | 52 | $content = @unserialize($fetched); |
53 | - if(is_numeric($content)) return $content; |
|
53 | + if(is_numeric($content)) { |
|
54 | + return $content; |
|
55 | + } |
|
54 | 56 | } |
55 | 57 | } |
56 | 58 |
@@ -39,7 +39,8 @@ discard block |
||
39 | 39 | <input type="hidden" name="ged" value="<?= $this->data->get('url_ged') ?>"> |
40 | 40 | <select name="city"> |
41 | 41 | <?php foreach ($cities as $city) { ?> |
42 | - <option value="<?= Functions::encryptToSafeBase64($city) ?>" <?php if(trim($city) == trim($selected_city)) echo 'selected="selected"'?> ><?= $city ?></option> |
|
42 | + <option value="<?= Functions::encryptToSafeBase64($city) ?>" <?php if(trim($city) == trim($selected_city)) { |
|
43 | + echo 'selected="selected"'?> ><?= $city ?></option> |
|
43 | 44 | <?php } ?> |
44 | 45 | </select> |
45 | 46 | <input type="submit" value="<?= I18N::translate('Show') ?>" /> |
@@ -72,9 +73,12 @@ discard block |
||
72 | 73 | <!-- Certificate Name --> |
73 | 74 | <?php |
74 | 75 | $name = $certificate->getCertificateDetails() ?: ''; |
76 | +} |
|
75 | 77 | $sortname = ""; |
76 | 78 | $ct_names=preg_match("/([A-Z]{2,})/", $name, $match); |
77 | - if($ct_names > 0) $sortname = $match[1].'_'; |
|
79 | + if($ct_names > 0) { |
|
80 | + $sortname = $match[1].'_'; |
|
81 | + } |
|
78 | 82 | $sortname .= $name; |
79 | 83 | ?> |
80 | 84 | <td data-sort="<?= Filter::escapeHtml($sortname) ?>"> |
@@ -89,9 +89,10 @@ |
||
89 | 89 | $wb_controller = new WelcomeBlockController($this); |
90 | 90 | try { |
91 | 91 | return $wb_controller->config($block_id); |
92 | - } |
|
93 | - catch (MvcException $ex) { |
|
94 | - if($ex->getHttpCode() != 200) throw $ex; |
|
92 | + } catch (MvcException $ex) { |
|
93 | + if($ex->getHttpCode() != 200) { |
|
94 | + throw $ex; |
|
95 | + } |
|
95 | 96 | return; |
96 | 97 | } |
97 | 98 | } |
@@ -98,7 +98,9 @@ |
||
98 | 98 | */ |
99 | 99 | public function config($block_id = null) { |
100 | 100 | |
101 | - if(empty($block_id)) throw new MvcException(404); |
|
101 | + if(empty($block_id)) { |
|
102 | + throw new MvcException(404); |
|
103 | + } |
|
102 | 104 | |
103 | 105 | if (Filter::postBool('save') && Filter::checkCsrf()) { |
104 | 106 | $this->module->setBlockSetting($block_id, 'piwik_enabled', Filter::postBool('piwik_enabled')); |
@@ -293,10 +293,8 @@ discard block |
||
293 | 293 | <?= I18N::number($family->getNumberOfChildren()) ?> |
294 | 294 | </td> |
295 | 295 | <td hidden><?php |
296 | - if (!$mdate->isOK()) { echo 'U'; } |
|
297 | - else { |
|
298 | - if (Date::compare($mdate, new Date(date('Y') - 100)) > 0) { echo 'Y100'; } |
|
299 | - else { echo 'YES'; } |
|
296 | + if (!$mdate->isOK()) { echo 'U'; } else { |
|
297 | + if (Date::compare($mdate, new Date(date('Y') - 100)) > 0) { echo 'Y100'; } else { echo 'YES'; } |
|
300 | 298 | } |
301 | 299 | if ($family->getFacts(WT_EVENTS_DIV)) { echo 'D'; } |
302 | 300 | if (count($husb->getSpouseFamilies()) > 1 || count($wife->getSpouseFamilies()) > 1) { |
@@ -316,9 +314,7 @@ discard block |
||
316 | 314 | if (!$husb->isDead() && !$wife->isDead()) { echo 'N'; } ?> |
317 | 315 | </td> |
318 | 316 | <td hidden><?php |
319 | - if (!$husb->getChildFamilies() && !$wife->getChildFamilies()) { echo 'R'; } |
|
320 | - elseif (!$husb->isDead() && !$wife->isDead() && $family->getNumberOfChildren() < 1) { echo 'L'; } |
|
321 | - else { echo ' '; } ?> |
|
317 | + if (!$husb->getChildFamilies() && !$wife->getChildFamilies()) { echo 'R'; } elseif (!$husb->isDead() && !$wife->isDead() && $family->getNumberOfChildren() < 1) { echo 'L'; } else { echo ' '; } ?> |
|
322 | 318 | </td> |
323 | 319 | </tr> |
324 | 320 | <?php } ?> |
@@ -184,7 +184,10 @@ |
||
184 | 184 | <td class="ui-state-default" colspan="11"> |
185 | 185 | <div class="center"> |
186 | 186 | <?= I18N::translate('Number of different missing ancestors: %s', I18N::number($this->data->get('missing_diff_count'))) ?> |
187 | - <?php if($this->data->get('missing_hidden') > 0) echo ' ['. I18N::translate('%s hidden', I18N::number($this->data->get('missing_hidden'))).']'; ?> |
|
187 | + <?php if($this->data->get('missing_hidden') > 0) { |
|
188 | + echo ' ['. I18N::translate('%s hidden', I18N::number($this->data->get('missing_hidden'))).']'; |
|
189 | +} |
|
190 | +?> |
|
188 | 191 | <?= ' - ' . I18N::translate('Generation complete at %s', I18N::percentage($this->data->get('perc_sosa'), 2)) ?> |
189 | 192 | <?= ' [' . I18N::translate('Potential %s', I18N::percentage($this->data->get('perc_sosa_potential'),2)).']' ?> |
190 | 193 | </div> |
@@ -94,8 +94,12 @@ discard block |
||
94 | 94 | foreach($stats_gen as $gen => $tab){ |
95 | 95 | $genY1= I18N::translate('-'); |
96 | 96 | $genY2= I18N::translate('-'); |
97 | - if($tab['firstBirth']>0) $genY1=$tab['firstBirth']; |
|
98 | - if($tab['lastBirth']>0) $genY2=$tab['lastBirth']; |
|
97 | + if($tab['firstBirth']>0) { |
|
98 | + $genY1=$tab['firstBirth']; |
|
99 | + } |
|
100 | + if($tab['lastBirth']>0) { |
|
101 | + $genY2=$tab['lastBirth']; |
|
102 | + } |
|
99 | 103 | $total_theoretical += $gen_theoretical; |
100 | 104 | $perc_sosa_count_theor = Functions::safeDivision($tab['sosaCount'], $gen_theoretical); |
101 | 105 | $gen_equiv += $perc_sosa_count_theor; |
@@ -141,7 +145,9 @@ discard block |
||
141 | 145 | private function htmlAncestorDispersionG2() |
142 | 146 | { |
143 | 147 | $ancestorsDispGen2 = $this->sosa_provider->getAncestorDispersionForGen(2); |
144 | - if(count($ancestorsDispGen2) == 0) return; |
|
148 | + if(count($ancestorsDispGen2) == 0) { |
|
149 | + return; |
|
150 | + } |
|
145 | 151 | |
146 | 152 | $size = '600x300'; |
147 | 153 |