@@ -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) ?>"> |
@@ -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> |
@@ -31,11 +31,16 @@ |
||
31 | 31 | $nb_levels = count($parent); |
32 | 32 | for ($i=0; $i < $nb_levels; $i++) { |
33 | 33 | $parent[$i] = trim($parent[$i]); |
34 | - if (empty($parent[$i])) $parent[$i]='unknown';// GoogleMap module uses "unknown" while GEDCOM uses , , |
|
34 | + if (empty($parent[$i])) { |
|
35 | + $parent[$i]='unknown'; |
|
36 | + } |
|
37 | + // GoogleMap module uses "unknown" while GEDCOM uses , , |
|
35 | 38 | $pl_id=Database::prepare('SELECT pl_id FROM `##placelocation` WHERE pl_level=? AND pl_parent_id=? AND pl_place LIKE ? ORDER BY pl_place') |
36 | 39 | ->execute(array($i, $place_id, $parent[$i])) |
37 | 40 | ->fetchOne(); |
38 | - if (empty($pl_id)) break; |
|
41 | + if (empty($pl_id)) { |
|
42 | + break; |
|
43 | + } |
|
39 | 44 | $place_id = $pl_id; |
40 | 45 | } |
41 | 46 | return $place_id; |
@@ -65,8 +65,9 @@ discard block |
||
65 | 65 | public function hExtendIndiHeaderIcons(IndividualController $ctrlIndi) { |
66 | 66 | if($ctrlIndi){ |
67 | 67 | $dindi = new Individual($ctrlIndi->getSignificantIndividual()); |
68 | - if ($dindi->canDisplayIsSourced()) |
|
69 | - return FunctionsPrint::formatIsSourcedIcon('R', $dindi->isSourced(), 'INDI', 1, 'large'); |
|
68 | + if ($dindi->canDisplayIsSourced()) { |
|
69 | + return FunctionsPrint::formatIsSourcedIcon('R', $dindi->isSourced(), 'INDI', 1, 'large'); |
|
70 | + } |
|
70 | 71 | } |
71 | 72 | return ''; |
72 | 73 | } |
@@ -99,8 +100,9 @@ discard block |
||
99 | 100 | $dindi = new Individual($grec); |
100 | 101 | $html .= FunctionsPrint::formatIsSourcedIcon('R', $dindi->isSourced(), 'INDI', 1, $size); |
101 | 102 | $html .= FunctionsPrint::formatIsSourcedIcon('E', $dindi->isBirthSourced(), 'BIRT', 1, $size); |
102 | - if($grec->isDead()) |
|
103 | - $html .= FunctionsPrint::formatIsSourcedIcon('E', $dindi->isDeathSourced(), 'DEAT', 1, $size); |
|
103 | + if($grec->isDead()) { |
|
104 | + $html .= FunctionsPrint::formatIsSourcedIcon('E', $dindi->isDeathSourced(), 'DEAT', 1, $size); |
|
105 | + } |
|
104 | 106 | } |
105 | 107 | return $html; |
106 | 108 | } |
@@ -173,12 +175,13 @@ discard block |
||
173 | 175 | </tr>'; |
174 | 176 | } |
175 | 177 | |
176 | - if( $root->isDead() ) |
|
177 | - echo ' |
|
178 | + if( $root->isDead() ) { |
|
179 | + echo ' |
|
178 | 180 | <tr> |
179 | 181 | <td class="slabel">' . GedcomTag::getLabel('DEAT') . '</td> |
180 | 182 | <td class="svalue">' . FunctionsPrint::formatIsSourcedIcon('E', $dindi->isDeathSourced(), 'DEAT', 1).'</td> |
181 | 183 | </tr>'; |
184 | + } |
|
182 | 185 | |
183 | 186 | echo '</table>'; |
184 | 187 | } |
@@ -45,7 +45,9 @@ |
||
45 | 45 | public function render() { |
46 | 46 | global $controller; |
47 | 47 | |
48 | - if(!$this->ctrl) throw new \Exception('Controller not initialised'); |
|
48 | + if(!$this->ctrl) { |
|
49 | + throw new \Exception('Controller not initialised'); |
|
50 | + } |
|
49 | 51 | |
50 | 52 | $controller = $this->ctrl; |
51 | 53 | $this->ctrl->pageHeader(); |
@@ -86,9 +86,12 @@ discard block |
||
86 | 86 | * @return boolean |
87 | 87 | */ |
88 | 88 | public function canDisplayIsSourced($access_level = null){ |
89 | - if(!$this->gedcomrecord->canShow($access_level)) return false; |
|
90 | - if($access_level === null ) |
|
91 | - $access_level = \Fisharebest\Webtrees\Auth::accessLevel($this->gedcomrecord->getTree()); |
|
89 | + if(!$this->gedcomrecord->canShow($access_level)) { |
|
90 | + return false; |
|
91 | + } |
|
92 | + if($access_level === null ) { |
|
93 | + $access_level = \Fisharebest\Webtrees\Auth::accessLevel($this->gedcomrecord->getTree()); |
|
94 | + } |
|
92 | 95 | |
93 | 96 | $global_facts = Globals::getGlobalFacts(); |
94 | 97 | if (isset($global_facts['SOUR'])) { |
@@ -108,7 +111,9 @@ discard block |
||
108 | 111 | * @return int Level of sources |
109 | 112 | */ |
110 | 113 | public function isSourced(){ |
111 | - if($this->_issourced !== null) return $this->_issourced; |
|
114 | + if($this->_issourced !== null) { |
|
115 | + return $this->_issourced; |
|
116 | + } |
|
112 | 117 | $this->_issourced=-1; |
113 | 118 | $sourcesfacts = $this->gedcomrecord->getFacts('SOUR'); |
114 | 119 | foreach($sourcesfacts as $sourcefact){ |
@@ -127,7 +132,9 @@ discard block |
||
127 | 132 | * @return int Level of sources |
128 | 133 | */ |
129 | 134 | public function isFactSourced($eventslist){ |
130 | - if(empty($eventslist)) return 0; |
|
135 | + if(empty($eventslist)) { |
|
136 | + return 0; |
|
137 | + } |
|
131 | 138 | $isSourced=0; |
132 | 139 | $facts = $this->gedcomrecord->getFacts($eventslist); |
133 | 140 | foreach($facts as $fact){ |
@@ -137,8 +144,7 @@ discard block |
||
137 | 144 | if($tmpIsSourced != 0) { |
138 | 145 | if($isSourced==0) { |
139 | 146 | $isSourced = $tmpIsSourced; |
140 | - } |
|
141 | - else{ |
|
147 | + } else{ |
|
142 | 148 | $isSourced = max($isSourced, $tmpIsSourced); |
143 | 149 | } |
144 | 150 | } |
@@ -123,7 +123,9 @@ |
||
123 | 123 | $tree = Globals::getTree(); |
124 | 124 | $cid = Filter::get('cid'); |
125 | 125 | $certificate = null; |
126 | - if(!empty($cid)) $certificate = Certificate::getInstance($cid, $tree, null, $this->provider); |
|
126 | + if(!empty($cid)) { |
|
127 | + $certificate = Certificate::getInstance($cid, $tree, null, $this->provider); |
|
128 | + } |
|
127 | 129 | |
128 | 130 | $imageBuilder = new ImageBuilder($certificate); |
129 | 131 |
@@ -85,7 +85,9 @@ |
||
85 | 85 | */ |
86 | 86 | public function index() { |
87 | 87 | $action = Filter::post('action'); |
88 | - if($action == 'update' && Filter::checkCsrf()) $this->update(); |
|
88 | + if($action == 'update' && Filter::checkCsrf()) { |
|
89 | + $this->update(); |
|
90 | + } |
|
89 | 91 | |
90 | 92 | Theme::theme(new AdministrationTheme)->init(Globals::getTree()); |
91 | 93 | $ctrl = new PageController(); |