@@ -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(); |
@@ -61,7 +61,9 @@ |
||
61 | 61 | */ |
62 | 62 | public function index() { |
63 | 63 | $action = Filter::post('action'); |
64 | - if($action == 'update' && Filter::checkCsrf()) $this->update(); |
|
64 | + if($action == 'update' && Filter::checkCsrf()) { |
|
65 | + $this->update(); |
|
66 | + } |
|
65 | 67 | |
66 | 68 | Theme::theme(new AdministrationTheme)->init(Globals::getTree()); |
67 | 69 | $ctrl = new PageController(); |
@@ -115,7 +115,9 @@ discard block |
||
115 | 115 | $sid=null; |
116 | 116 | |
117 | 117 | if($this->getSetting('MAJ_SHOW_CERT', Auth::PRIV_HIDE) >= Auth::accessLevel($wt_tree)){ |
118 | - if (!$srec || strlen($srec) == 0) return $html; |
|
118 | + if (!$srec || strlen($srec) == 0) { |
|
119 | + return $html; |
|
120 | + } |
|
119 | 121 | |
120 | 122 | $certificate = null; |
121 | 123 | $subrecords = explode("\n", $srec); |
@@ -129,11 +131,14 @@ discard block |
||
129 | 131 | $subrecords[$i] = trim($subrecords[$i]); |
130 | 132 | $tag = substr($subrecords[$i], 2, 4); |
131 | 133 | $text = substr($subrecords[$i], 7); |
132 | - if($tag == '_ACT') $certificate= new Certificate($text, $wt_tree, $this->getProvider()); |
|
134 | + if($tag == '_ACT') { |
|
135 | + $certificate= new Certificate($text, $wt_tree, $this->getProvider()); |
|
136 | + } |
|
133 | 137 | } |
134 | 138 | |
135 | - if($certificate && $certificate->canShow()) |
|
136 | - $html = $this->getDisplay_ACT($certificate, $sid); |
|
139 | + if($certificate && $certificate->canShow()) { |
|
140 | + $html = $this->getDisplay_ACT($certificate, $sid); |
|
141 | + } |
|
137 | 142 | |
138 | 143 | } |
139 | 144 | return $html; |
@@ -161,7 +166,9 @@ discard block |
||
161 | 166 | $html = ''; |
162 | 167 | switch($tag){ |
163 | 168 | case '_ACT': |
164 | - if($context == 'SOUR') $html = $this->getDisplay_ACT($value, $contextid); |
|
169 | + if($context == 'SOUR') { |
|
170 | + $html = $this->getDisplay_ACT($value, $contextid); |
|
171 | + } |
|
165 | 172 | break; |
166 | 173 | } |
167 | 174 | return $html; |
@@ -189,7 +196,9 @@ discard block |
||
189 | 196 | $html .= '<select id="certifCity'.$element_id.'" class="_CITY">'; |
190 | 197 | foreach ($tabCities as $cities){ |
191 | 198 | $selectedCity=''; |
192 | - if($certificate && $cities== $certificate->getCity()) $selectedCity='selected="true"'; |
|
199 | + if($certificate && $cities== $certificate->getCity()) { |
|
200 | + $selectedCity='selected="true"'; |
|
201 | + } |
|
193 | 202 | $html .= '<option value="'.$cities.'" '.$selectedCity.' />'.$cities.'</option>'; |
194 | 203 | } |
195 | 204 | $html .= '</select>'; |
@@ -104,7 +104,9 @@ discard block |
||
104 | 104 | }'); |
105 | 105 | |
106 | 106 | $action = Filter::post('action'); |
107 | - if($action === 'update') $this->update($controller); |
|
107 | + if($action === 'update') { |
|
108 | + $this->update($controller); |
|
109 | + } |
|
108 | 110 | |
109 | 111 | $view_bag = new ViewBag(); |
110 | 112 | $view_bag->set('title', $controller->getPageTitle()); |
@@ -149,7 +151,9 @@ discard block |
||
149 | 151 | $user = User::find(Filter::getInteger('userid', -1)); |
150 | 152 | if($user) { |
151 | 153 | $calculator = new SosaCalculator(Globals::getTree(), $user); |
152 | - if($calculator->computeAll()) $view_bag->set('is_success', true); |
|
154 | + if($calculator->computeAll()) { |
|
155 | + $view_bag->set('is_success', true); |
|
156 | + } |
|
153 | 157 | } |
154 | 158 | ViewFactory::make('SosaComputeResult', $this, $controller, $view_bag)->render(); |
155 | 159 | } |
@@ -170,9 +174,10 @@ discard block |
||
170 | 174 | |
171 | 175 | if($user && $indi) { |
172 | 176 | $calculator = new SosaCalculator($wt_tree, $user); |
173 | - if($calculator->computeFromIndividual($indi)) $view_bag->set('is_success', true); |
|
174 | - } |
|
175 | - else { |
|
177 | + if($calculator->computeFromIndividual($indi)) { |
|
178 | + $view_bag->set('is_success', true); |
|
179 | + } |
|
180 | + } else { |
|
176 | 181 | $view_bag->set('error', I18N::translate('Non existing individual')); |
177 | 182 | } |
178 | 183 |
@@ -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'; |
@@ -92,7 +94,9 @@ discard block |
||
92 | 94 | HookProvider::getInstance()->updateHooks(); |
93 | 95 | |
94 | 96 | $action = Filter::post('action'); |
95 | - if($action == 'update' && Filter::checkCsrf()) $this->update(); |
|
97 | + if($action == 'update' && Filter::checkCsrf()) { |
|
98 | + $this->update(); |
|
99 | + } |
|
96 | 100 | |
97 | 101 | Theme::theme(new AdministrationTheme)->init(Globals::getTree()); |
98 | 102 | $ctrl = new PageController(); |
@@ -160,7 +160,9 @@ discard block |
||
160 | 160 | public static function htmlIndividualForList(\Fisharebest\Webtrees\Individual $individual, $isStrong = true){ |
161 | 161 | $html = ''; |
162 | 162 | $tag = 'em'; |
163 | - if($isStrong) $tag = 'strong'; |
|
163 | + if($isStrong) { |
|
164 | + $tag = 'strong'; |
|
165 | + } |
|
164 | 166 | if($individual && $individual->canShow()){ |
165 | 167 | $dindi = new Individual($individual); |
166 | 168 | $html = $individual->getSexImage(); |
@@ -174,8 +176,7 @@ discard block |
||
174 | 176 | $html .= ' <span><small><em>'.$dindi->formatFirstMajorFact(WT_EVENTS_BIRT, 10).'</em></small></span>'; |
175 | 177 | $html .= ' <span><small><em>'.$dindi->formatFirstMajorFact(WT_EVENTS_DEAT, 10).'</em></small></span>'; |
176 | 178 | $html .= '</a>'; |
177 | - } |
|
178 | - else { |
|
179 | + } else { |
|
179 | 180 | $html .= '<span class=\"list_item\"><'.$tag.'>' . I18N::translate('Private') . '</'.$tag.'></span>'; |
180 | 181 | } |
181 | 182 | return $html; |
@@ -193,8 +194,7 @@ discard block |
||
193 | 194 | $date = $fact->getDate(); |
194 | 195 | if($date->isOK()){ |
195 | 196 | $html.=' '.$date->Display($anchor && !Globals::isSearchSpider(), '%Y'); |
196 | - } |
|
197 | - else{ |
|
197 | + } else{ |
|
198 | 198 | // 1 DEAT Y with no DATE => print YES |
199 | 199 | // 1 BIRT 2 SOUR @S1@ => print YES |
200 | 200 | // 1 DEAT N is not allowed |
@@ -218,7 +218,9 @@ discard block |
||
218 | 218 | public static function formatFactPlaceShort(\Fisharebest\Webtrees\Fact $fact, $format, $anchor=false){ |
219 | 219 | $html=''; |
220 | 220 | |
221 | - if ($fact === null) return $html; |
|
221 | + if ($fact === null) { |
|
222 | + return $html; |
|
223 | + } |
|
222 | 224 | $place = $fact->getPlace(); |
223 | 225 | if($place){ |
224 | 226 | $dplace = new Place($place); |
@@ -336,7 +338,9 @@ discard block |
||
336 | 338 | default: |
337 | 339 | break; |
338 | 340 | } |
339 | - if($image && $title) $html = '<i class="icon-maj-sourced-'.$size.'_'.$image.'" title="'.$title.'"></i>'; |
|
341 | + if($image && $title) { |
|
342 | + $html = '<i class="icon-maj-sourced-'.$size.'_'.$image.'" title="'.$title.'"></i>'; |
|
343 | + } |
|
340 | 344 | break; |
341 | 345 | default: |
342 | 346 | break; |