@@ -431,8 +431,7 @@ discard block |
||
| 431 | 431 | ) { |
| 432 | 432 | $birt_by_decade[(int)($birth_dates[0]->gregorianYear()/10)*10] .= $person->getSex(); |
| 433 | 433 | } |
| 434 | - } |
|
| 435 | - else { |
|
| 434 | + } else { |
|
| 436 | 435 | $birth_dates[0]=new Date(''); |
| 437 | 436 | } |
| 438 | 437 | if ($death_dates = $person->getAllDeathDates()) { |
@@ -443,8 +442,7 @@ discard block |
||
| 443 | 442 | ) { |
| 444 | 443 | $deat_by_decade[(int) ($death_dates[0]->gregorianYear() / 10) * 10] .= $person->getSex(); |
| 445 | 444 | } |
| 446 | - } |
|
| 447 | - else { |
|
| 445 | + } else { |
|
| 448 | 446 | $death_dates[0] = new Date(''); |
| 449 | 447 | } |
| 450 | 448 | $age = Date::getAge($birth_dates[0], $death_dates[0], 0); |
@@ -324,10 +324,8 @@ discard block |
||
| 324 | 324 | <td><?php echo I18N::number($nchi); ?></td> |
| 325 | 325 | <td><?php echo $nchi; ?></td> |
| 326 | 326 | <td><?php |
| 327 | - if (!$mdate->isOK()) { echo 'U'; } |
|
| 328 | - else { |
|
| 329 | - if (Date::compare($mdate, new Date(date('Y') - 100)) > 0) { echo 'Y100'; } |
|
| 330 | - else { echo 'YES'; } |
|
| 327 | + if (!$mdate->isOK()) { echo 'U'; } else { |
|
| 328 | + if (Date::compare($mdate, new Date(date('Y') - 100)) > 0) { echo 'Y100'; } else { echo 'YES'; } |
|
| 331 | 329 | } |
| 332 | 330 | if ($family->getFacts(WT_EVENTS_DIV)) { echo 'D'; } |
| 333 | 331 | if (count($husb->getSpouseFamilies()) > 1 || count($wife->getSpouseFamilies()) > 1) { |
@@ -347,9 +345,7 @@ discard block |
||
| 347 | 345 | if (!$husb->isDead() && !$wife->isDead()) { echo 'N'; } ?> |
| 348 | 346 | </td> |
| 349 | 347 | <td><?php |
| 350 | - if (!$husb->getChildFamilies() && !$wife->getChildFamilies()) { echo 'R'; } |
|
| 351 | - elseif (!$husb->isDead() && !$wife->isDead() && $family->getNumberOfChildren() < 1) { echo 'L'; } |
|
| 352 | - else { echo ' '; } ?> |
|
| 348 | + if (!$husb->getChildFamilies() && !$wife->getChildFamilies()) { echo 'R'; } elseif (!$husb->isDead() && !$wife->isDead() && $family->getNumberOfChildren() < 1) { echo 'L'; } else { echo ' '; } ?> |
|
| 353 | 349 | </td> |
| 354 | 350 | </tr> |
| 355 | 351 | <?php } ?> |
@@ -218,7 +218,10 @@ |
||
| 218 | 218 | $missing_hidden = $this->data->get('missing_hidden'); |
| 219 | 219 | ?> |
| 220 | 220 | <?php echo I18N::translate('Number of different missing ancestors: %s', I18N::number($this->data->get('missing_diff_count'))); ?> |
| 221 | - <?php if($this->data->get('missing_hidden') > 0) echo ' ['. I18N::translate('%s hidden', I18N::number($this->data->get('missing_hidden'))).']'; ?> |
|
| 221 | + <?php if($this->data->get('missing_hidden') > 0) { |
|
| 222 | + echo ' ['. I18N::translate('%s hidden', I18N::number($this->data->get('missing_hidden'))).']'; |
|
| 223 | +} |
|
| 224 | +?> |
|
| 222 | 225 | <?php echo ' - ' . I18N::translate('Generation complete at %s', I18N::percentage($this->data->get('perc_sosa'), 2)); ?> |
| 223 | 226 | <?php echo ' [' . I18N::translate('Potential %s', I18N::percentage($this->data->get('perc_sosa_potential'),2)).']'; ?> |
| 224 | 227 | </div> |
@@ -92,8 +92,12 @@ discard block |
||
| 92 | 92 | foreach($stats_gen as $gen => $tab){ |
| 93 | 93 | $genY1= I18N::translate('-'); |
| 94 | 94 | $genY2= I18N::translate('-'); |
| 95 | - if($tab['firstBirth']>0) $genY1=$tab['firstBirth']; |
|
| 96 | - if($tab['lastBirth']>0) $genY2=$tab['lastBirth']; |
|
| 95 | + if($tab['firstBirth']>0) { |
|
| 96 | + $genY1=$tab['firstBirth']; |
|
| 97 | + } |
|
| 98 | + if($tab['lastBirth']>0) { |
|
| 99 | + $genY2=$tab['lastBirth']; |
|
| 100 | + } |
|
| 97 | 101 | $total_theoretical += $gen_theoretical; |
| 98 | 102 | $perc_sosa_count_theor = Functions::safeDivision($tab['sosaCount'], $gen_theoretical); |
| 99 | 103 | $gen_equiv += $perc_sosa_count_theor; |
@@ -139,7 +143,9 @@ discard block |
||
| 139 | 143 | private function htmlAncestorDispersionG2() |
| 140 | 144 | { |
| 141 | 145 | $ancestorsDispGen2 = $this->sosa_provider->getAncestorDispersionForGen(2); |
| 142 | - if(count($ancestorsDispGen2) == 0) return; |
|
| 146 | + if(count($ancestorsDispGen2) == 0) { |
|
| 147 | + return; |
|
| 148 | + } |
|
| 143 | 149 | |
| 144 | 150 | $size = '600x300'; |
| 145 | 151 | $sizes = explode('x', $size); |
@@ -55,8 +55,7 @@ discard block |
||
| 55 | 55 | echo FunctionsPrintLists::surnameTable($surns, WT_SCRIPT_NAME, $tree, $extra_params); |
| 56 | 56 | break; |
| 57 | 57 | } |
| 58 | - } |
|
| 59 | - else if ($this->data->get('islineages', false)) { |
|
| 58 | + } else if ($this->data->get('islineages', false)) { |
|
| 60 | 59 | //Link to indilist |
| 61 | 60 | echo '<p class="center"><strong>'. |
| 62 | 61 | '<a href="indilist.php?ged=' . $tree->getNameUrl() . '&surname=' . rawurlencode($this->data->get('surname')) .'">'. |
@@ -81,7 +80,9 @@ discard block |
||
| 81 | 80 | |
| 82 | 81 | foreach($lineages as $i => $lineage) { |
| 83 | 82 | $this->printRootLineage($lineage); |
| 84 | - if($i < $nb_lineages - 1) echo '<hr />'; |
|
| 83 | + if($i < $nb_lineages - 1) { |
|
| 84 | + echo '<hr />'; |
|
| 85 | + } |
|
| 85 | 86 | } |
| 86 | 87 | |
| 87 | 88 | echo '</div>'; |
@@ -156,8 +157,7 @@ discard block |
||
| 156 | 157 | } |
| 157 | 158 | } |
| 158 | 159 | } |
| 159 | - } |
|
| 160 | - else { |
|
| 160 | + } else { |
|
| 161 | 161 | $this->printLineage($node); |
| 162 | 162 | } |
| 163 | 163 | echo '</div>'; |
@@ -185,8 +185,7 @@ discard block |
||
| 185 | 185 | echo '<li>'; |
| 186 | 186 | if($is_first_family){ |
| 187 | 187 | echo FunctionsPrint::htmlIndividualForList($node_indi); |
| 188 | - } |
|
| 189 | - else{ |
|
| 188 | + } else{ |
|
| 190 | 189 | echo FunctionsPrint::htmlIndividualForList($node_indi, false); |
| 191 | 190 | } |
| 192 | 191 | //Get individual's spouse |
@@ -207,15 +206,13 @@ discard block |
||
| 207 | 206 | foreach($fam_nodes[$fam] as $child_node) { |
| 208 | 207 | if($child_node) { |
| 209 | 208 | $this->printLineage($child_node); |
| 210 | - } |
|
| 211 | - else { |
|
| 209 | + } else { |
|
| 212 | 210 | echo '<ul><li><strong>…</strong></li></ul>'; |
| 213 | 211 | } |
| 214 | 212 | } |
| 215 | 213 | $is_first_family = false; |
| 216 | 214 | } |
| 217 | - } |
|
| 218 | - else { |
|
| 215 | + } else { |
|
| 219 | 216 | echo '<li>'; |
| 220 | 217 | echo \MyArtJaub\Webtrees\Functions\FunctionsPrint::htmlIndividualForList($node->getIndividual()); |
| 221 | 218 | if($node->hasFollowUpSurname()) { |
@@ -171,8 +171,7 @@ |
||
| 171 | 171 | |
| 172 | 172 | if ($this->show_all==='no') { |
| 173 | 173 | $view_bag->set('table_title', I18N::translate('Individuals in %s lineages', $this->legend)); |
| 174 | - } |
|
| 175 | - else { |
|
| 174 | + } else { |
|
| 176 | 175 | $view_bag->set('table_title', I18N::translate('All lineages')); |
| 177 | 176 | } |
| 178 | 177 | } |
@@ -105,7 +105,9 @@ discard block |
||
| 105 | 105 | $sid=null; |
| 106 | 106 | |
| 107 | 107 | if($this->getSetting('MAJ_SHOW_CERT', Auth::PRIV_HIDE) >= Auth::accessLevel($WT_TREE)){ |
| 108 | - if (!$srec || strlen($srec) == 0) return $html; |
|
| 108 | + if (!$srec || strlen($srec) == 0) { |
|
| 109 | + return $html; |
|
| 110 | + } |
|
| 109 | 111 | |
| 110 | 112 | $certificate = null; |
| 111 | 113 | $subrecords = explode("\n", $srec); |
@@ -118,11 +120,14 @@ discard block |
||
| 118 | 120 | $level = substr($subrecords[$i], 0, 1); |
| 119 | 121 | $tag = substr($subrecords[$i], 2, 4); |
| 120 | 122 | $text = substr($subrecords[$i], 7); |
| 121 | - if($tag == '_ACT') $certificate= new Certificate($text, $WT_TREE, $this->getProvider()); |
|
| 123 | + if($tag == '_ACT') { |
|
| 124 | + $certificate= new Certificate($text, $WT_TREE, $this->getProvider()); |
|
| 125 | + } |
|
| 122 | 126 | } |
| 123 | 127 | |
| 124 | - if($certificate && $certificate->canShow()) |
|
| 125 | - $html = $this->getDisplay_ACT($certificate, $sid); |
|
| 128 | + if($certificate && $certificate->canShow()) { |
|
| 129 | + $html = $this->getDisplay_ACT($certificate, $sid); |
|
| 130 | + } |
|
| 126 | 131 | |
| 127 | 132 | } |
| 128 | 133 | return $html; |
@@ -150,7 +155,9 @@ discard block |
||
| 150 | 155 | $html = ''; |
| 151 | 156 | switch($tag){ |
| 152 | 157 | case '_ACT': |
| 153 | - if($context == 'SOUR') $html = $this->getDisplay_ACT($value, $contextid); |
|
| 158 | + if($context == 'SOUR') { |
|
| 159 | + $html = $this->getDisplay_ACT($value, $contextid); |
|
| 160 | + } |
|
| 154 | 161 | break; |
| 155 | 162 | } |
| 156 | 163 | return $html; |
@@ -180,7 +187,9 @@ discard block |
||
| 180 | 187 | $html .= '<select id="certifCity'.$element_id.'" class="_CITY">'; |
| 181 | 188 | foreach ($tabCities as $cities){ |
| 182 | 189 | $selectedCity=''; |
| 183 | - if($certificate && $cities== $certificate->getCity()) $selectedCity='selected="true"'; |
|
| 190 | + if($certificate && $cities== $certificate->getCity()) { |
|
| 191 | + $selectedCity='selected="true"'; |
|
| 192 | + } |
|
| 184 | 193 | $html .= '<option value="'.$cities.'" '.$selectedCity.' />'.$cities.'</option>'; |
| 185 | 194 | } |
| 186 | 195 | $html .= '</select>'; |
@@ -47,7 +47,9 @@ discard block |
||
| 47 | 47 | $array_hook = explode('#', $ihook); |
| 48 | 48 | //Update status |
| 49 | 49 | $new_status= Filter::postBool('status-' . $params['id']); |
| 50 | - if(in_array($array_hook[0], $module_names)) $new_status = false; |
|
| 50 | + if(in_array($array_hook[0], $module_names)) { |
|
| 51 | + $new_status = false; |
|
| 52 | + } |
|
| 51 | 53 | $previous_status = $params['status']; |
| 52 | 54 | if ($new_status !== null) { |
| 53 | 55 | $new_status= $new_status ? 'enabled' : 'disabled'; |
@@ -94,7 +96,9 @@ discard block |
||
| 94 | 96 | HookProvider::updateHooks(); |
| 95 | 97 | |
| 96 | 98 | $action = Filter::post('action'); |
| 97 | - if($action == 'update' && Filter::checkCsrf()) $this->update(); |
|
| 99 | + if($action == 'update' && Filter::checkCsrf()) { |
|
| 100 | + $this->update(); |
|
| 101 | + } |
|
| 98 | 102 | |
| 99 | 103 | Theme::theme(new AdministrationTheme)->init($WT_TREE); |
| 100 | 104 | $ctrl = new PageController(); |
@@ -66,7 +66,10 @@ |
||
| 66 | 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)) { |
|
| 70 | + echo $mod->getTitle(); |
|
| 71 | +} |
|
| 72 | +?></td> |
|
| 70 | 73 | <td><input type="text" class="center" size="2" value="<?php echo $hook->priority; ?>" name="moduleorder-<?php echo $hook->id; ?>" /></td> |
| 71 | 74 | <td><?php echo $hook->priority; ?></td> |
| 72 | 75 | </tr> |