@@ -16,52 +16,52 @@ |
||
16 | 16 | */ |
17 | 17 | class MvcException extends \Exception { |
18 | 18 | |
19 | - /** @var int[] $VALID_HTTP List of valid HTTP codes */ |
|
20 | - protected static $VALID_HTTP = array( |
|
21 | - 100, 101, |
|
22 | - 200, 201, 202, 203, 204, 205, 206, |
|
23 | - 300, 301, 302, 303, 304, 305, 306, 307, |
|
24 | - 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, |
|
25 | - 500, 501, 502, 503, 504, 505 |
|
26 | - ); |
|
19 | + /** @var int[] $VALID_HTTP List of valid HTTP codes */ |
|
20 | + protected static $VALID_HTTP = array( |
|
21 | + 100, 101, |
|
22 | + 200, 201, 202, 203, 204, 205, 206, |
|
23 | + 300, 301, 302, 303, 304, 305, 306, 307, |
|
24 | + 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, |
|
25 | + 500, 501, 502, 503, 504, 505 |
|
26 | + ); |
|
27 | 27 | |
28 | - /** @var int $http_code */ |
|
29 | - protected $http_code; |
|
28 | + /** @var int $http_code */ |
|
29 | + protected $http_code; |
|
30 | 30 | |
31 | - /** |
|
32 | - * Constructor for MvcException |
|
33 | - * |
|
34 | - * @param int $http_code |
|
35 | - * @param string $message |
|
36 | - * @param int $code |
|
37 | - * @param \Throwable $previous |
|
38 | - */ |
|
39 | - public function __construct($http_code = 500, $message = "", $code = 0, \Throwable $previous = null) { |
|
40 | - parent::__construct($message, $code, $previous); |
|
31 | + /** |
|
32 | + * Constructor for MvcException |
|
33 | + * |
|
34 | + * @param int $http_code |
|
35 | + * @param string $message |
|
36 | + * @param int $code |
|
37 | + * @param \Throwable $previous |
|
38 | + */ |
|
39 | + public function __construct($http_code = 500, $message = "", $code = 0, \Throwable $previous = null) { |
|
40 | + parent::__construct($message, $code, $previous); |
|
41 | 41 | |
42 | - $this->http_code = in_array($http_code, self::$VALID_HTTP) ? $http_code : 500; |
|
43 | - } |
|
42 | + $this->http_code = in_array($http_code, self::$VALID_HTTP) ? $http_code : 500; |
|
43 | + } |
|
44 | 44 | |
45 | - /** |
|
46 | - * Get the HTTP code |
|
47 | - * |
|
48 | - * @return int |
|
49 | - */ |
|
50 | - public function getHttpCode() { |
|
51 | - return $this->http_code; |
|
52 | - } |
|
45 | + /** |
|
46 | + * Get the HTTP code |
|
47 | + * |
|
48 | + * @return int |
|
49 | + */ |
|
50 | + public function getHttpCode() { |
|
51 | + return $this->http_code; |
|
52 | + } |
|
53 | 53 | |
54 | - /** |
|
55 | - * Set the HTTP code |
|
56 | - * |
|
57 | - * @param int $http_code |
|
58 | - * @throws InvalidArgumentException Thrown if not valid Http code |
|
59 | - */ |
|
60 | - public function setHttpCode($http_code) { |
|
61 | - if(!in_array($http_code, self::$VALID_HTTP)) |
|
62 | - throw new \InvalidArgumentException('Invalid HTTP code'); |
|
63 | - $this->http_code= $http_code; |
|
64 | - } |
|
54 | + /** |
|
55 | + * Set the HTTP code |
|
56 | + * |
|
57 | + * @param int $http_code |
|
58 | + * @throws InvalidArgumentException Thrown if not valid Http code |
|
59 | + */ |
|
60 | + public function setHttpCode($http_code) { |
|
61 | + if(!in_array($http_code, self::$VALID_HTTP)) |
|
62 | + throw new \InvalidArgumentException('Invalid HTTP code'); |
|
63 | + $this->http_code= $http_code; |
|
64 | + } |
|
65 | 65 | |
66 | 66 | } |
67 | 67 |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | class MvcException extends \Exception { |
18 | 18 | |
19 | 19 | /** @var int[] $VALID_HTTP List of valid HTTP codes */ |
20 | - protected static $VALID_HTTP = array( |
|
20 | + protected static $VALID_HTTP = array( |
|
21 | 21 | 100, 101, |
22 | 22 | 200, 201, 202, 203, 204, 205, 206, |
23 | 23 | 300, 301, 302, 303, 304, 305, 306, 307, |
@@ -58,9 +58,9 @@ discard block |
||
58 | 58 | * @throws InvalidArgumentException Thrown if not valid Http code |
59 | 59 | */ |
60 | 60 | public function setHttpCode($http_code) { |
61 | - if(!in_array($http_code, self::$VALID_HTTP)) |
|
61 | + if (!in_array($http_code, self::$VALID_HTTP)) |
|
62 | 62 | throw new \InvalidArgumentException('Invalid HTTP code'); |
63 | - $this->http_code= $http_code; |
|
63 | + $this->http_code = $http_code; |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | } |
@@ -58,8 +58,9 @@ |
||
58 | 58 | * @throws InvalidArgumentException Thrown if not valid Http code |
59 | 59 | */ |
60 | 60 | public function setHttpCode($http_code) { |
61 | - if(!in_array($http_code, self::$VALID_HTTP)) |
|
62 | - throw new \InvalidArgumentException('Invalid HTTP code'); |
|
61 | + if(!in_array($http_code, self::$VALID_HTTP)) { |
|
62 | + throw new \InvalidArgumentException('Invalid HTTP code'); |
|
63 | + } |
|
63 | 64 | $this->http_code= $http_code; |
64 | 65 | } |
65 | 66 |
@@ -18,40 +18,40 @@ |
||
18 | 18 | */ |
19 | 19 | class JsonController extends BaseController { |
20 | 20 | |
21 | - /** |
|
22 | - * {@inheritDoc} |
|
23 | - * @see \Fisharebest\Webtrees\Controller\BaseController::pageHeader() |
|
24 | - */ |
|
25 | - public function pageHeader() { |
|
26 | - header('Content-Type: application/json'); |
|
27 | - header('Cache-Control: no-cache, must-revalidate'); |
|
28 | - header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); |
|
29 | - // We've displayed the header - display the footer automatically |
|
30 | - register_shutdown_function(array($this, 'pageFooter')); |
|
21 | + /** |
|
22 | + * {@inheritDoc} |
|
23 | + * @see \Fisharebest\Webtrees\Controller\BaseController::pageHeader() |
|
24 | + */ |
|
25 | + public function pageHeader() { |
|
26 | + header('Content-Type: application/json'); |
|
27 | + header('Cache-Control: no-cache, must-revalidate'); |
|
28 | + header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); |
|
29 | + // We've displayed the header - display the footer automatically |
|
30 | + register_shutdown_function(array($this, 'pageFooter')); |
|
31 | 31 | |
32 | - return $this; |
|
33 | - } |
|
32 | + return $this; |
|
33 | + } |
|
34 | 34 | |
35 | - /** |
|
36 | - * {@inheritDoc} |
|
37 | - * @see \Fisharebest\Webtrees\Controller\BaseController::pageFooter() |
|
38 | - */ |
|
39 | - public function pageFooter() { |
|
40 | - return $this; |
|
41 | - } |
|
35 | + /** |
|
36 | + * {@inheritDoc} |
|
37 | + * @see \Fisharebest\Webtrees\Controller\BaseController::pageFooter() |
|
38 | + */ |
|
39 | + public function pageFooter() { |
|
40 | + return $this; |
|
41 | + } |
|
42 | 42 | |
43 | - /** |
|
44 | - * Restrict access. |
|
45 | - * |
|
46 | - * @param bool $condition |
|
47 | - * |
|
48 | - * @return $this |
|
49 | - */ |
|
50 | - public function restrictAccess($condition) { |
|
51 | - if ($condition !== true) { |
|
52 | - throw new MvcException(403); |
|
53 | - } |
|
43 | + /** |
|
44 | + * Restrict access. |
|
45 | + * |
|
46 | + * @param bool $condition |
|
47 | + * |
|
48 | + * @return $this |
|
49 | + */ |
|
50 | + public function restrictAccess($condition) { |
|
51 | + if ($condition !== true) { |
|
52 | + throw new MvcException(403); |
|
53 | + } |
|
54 | 54 | |
55 | - return $this; |
|
56 | - } |
|
55 | + return $this; |
|
56 | + } |
|
57 | 57 | } |
@@ -30,11 +30,11 @@ discard block |
||
30 | 30 | * {@inhericDoc} |
31 | 31 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
32 | 32 | */ |
33 | - protected function renderContent() { |
|
33 | + protected function renderContent() { |
|
34 | 34 | |
35 | - if($this->data->get('has_sosa', false)) { |
|
36 | - $table_id = $this->data->get('table_id'); |
|
37 | - ?> |
|
35 | + if($this->data->get('has_sosa', false)) { |
|
36 | + $table_id = $this->data->get('table_id'); |
|
37 | + ?> |
|
38 | 38 | |
39 | 39 | <div id="sosa-indi-list" class="sosa-list"> |
40 | 40 | <table id="<?php echo $table_id;?>"> |
@@ -185,42 +185,42 @@ discard block |
||
185 | 185 | <tbody> |
186 | 186 | |
187 | 187 | <?php foreach($this->data->get('sosa_list') as $sosa => $person) { |
188 | - /** @var \Fisharebest\Webtrees\Individual $person */ |
|
189 | - if ($person->isPendingAddtion()) { |
|
190 | - $class = ' class="new"'; |
|
191 | - } elseif ($person->isPendingDeletion()) { |
|
192 | - $class = ' class="old"'; |
|
193 | - } else { |
|
194 | - $class = ''; |
|
195 | - } |
|
196 | - $dperson = new \MyArtJaub\Webtrees\Individual($person); |
|
197 | - ?> |
|
188 | + /** @var \Fisharebest\Webtrees\Individual $person */ |
|
189 | + if ($person->isPendingAddtion()) { |
|
190 | + $class = ' class="new"'; |
|
191 | + } elseif ($person->isPendingDeletion()) { |
|
192 | + $class = ' class="old"'; |
|
193 | + } else { |
|
194 | + $class = ''; |
|
195 | + } |
|
196 | + $dperson = new \MyArtJaub\Webtrees\Individual($person); |
|
197 | + ?> |
|
198 | 198 | <tr <?php echo $class?>> |
199 | 199 | <td class="transparent"><?php echo $sosa; ?></td> |
200 | 200 | <td class="transparent"><?php echo $person->getXref(); ?></td> |
201 | 201 | <td colspan="2"> |
202 | 202 | <?php foreach ($person->getAllNames() as $num=>$name) { |
203 | - if ($name['type']=='NAME') { |
|
204 | - $title=''; |
|
205 | - } else { |
|
206 | - $title='title="'.strip_tags(GedcomTag::getLabel($name['type'], $person)).'"'; |
|
207 | - } |
|
208 | - if ($num==$person->getPrimaryName()) { |
|
209 | - $class=' class="name2"'; |
|
210 | - $sex_image=$person->getSexImage(); |
|
211 | - list($surn, $givn)=explode(',', $name['sort']); |
|
212 | - } else { |
|
213 | - $class=''; |
|
214 | - $sex_image=''; |
|
215 | - } ?> |
|
203 | + if ($name['type']=='NAME') { |
|
204 | + $title=''; |
|
205 | + } else { |
|
206 | + $title='title="'.strip_tags(GedcomTag::getLabel($name['type'], $person)).'"'; |
|
207 | + } |
|
208 | + if ($num==$person->getPrimaryName()) { |
|
209 | + $class=' class="name2"'; |
|
210 | + $sex_image=$person->getSexImage(); |
|
211 | + list($surn, $givn)=explode(',', $name['sort']); |
|
212 | + } else { |
|
213 | + $class=''; |
|
214 | + $sex_image=''; |
|
215 | + } ?> |
|
216 | 216 | <a <?php echo $title.' '.$class; ?> href="<?php echo $person->getHtmlUrl(); ?>"> |
217 | 217 | <?php echo \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($name['full']); ?> |
218 | 218 | </a> |
219 | 219 | <?php echo $sex_image.FunctionsPrint::formatSosaNumbers($dperson->getSosaNumbers(), 1, 'smaller'); ?> |
220 | 220 | <br/> |
221 | 221 | <?php } |
222 | - echo $person->getPrimaryParentsNames('parents details1', 'none'); |
|
223 | - ?> |
|
222 | + echo $person->getPrimaryParentsNames('parents details1', 'none'); |
|
223 | + ?> |
|
224 | 224 | </td> |
225 | 225 | <td style="display:none;"></td> |
226 | 226 | <td> |
@@ -231,35 +231,35 @@ discard block |
||
231 | 231 | </td> |
232 | 232 | <td> |
233 | 233 | <?php |
234 | - if ($birth_dates=$person->getAllBirthDates()) { |
|
235 | - foreach ($birth_dates as $num=>$birth_date) { |
|
236 | - if ($num) { ?><br/><?php } ?> |
|
234 | + if ($birth_dates=$person->getAllBirthDates()) { |
|
235 | + foreach ($birth_dates as $num=>$birth_date) { |
|
236 | + if ($num) { ?><br/><?php } ?> |
|
237 | 237 | <?php echo $birth_date->display(true); |
238 | - } |
|
239 | - } else { |
|
240 | - $birth_date = new Date(''); |
|
241 | - if ($person->getTree()->getPreference('SHOW_EST_LIST_DATES')) { |
|
242 | - $birth_date=$person->getEstimatedBirthDate(); |
|
243 | - echo $birth_date->display(true); |
|
244 | - } else { |
|
245 | - echo ' '; |
|
246 | - } |
|
247 | - $birth_dates[0] = new Date(''); |
|
248 | - } |
|
249 | - ?> |
|
238 | + } |
|
239 | + } else { |
|
240 | + $birth_date = new Date(''); |
|
241 | + if ($person->getTree()->getPreference('SHOW_EST_LIST_DATES')) { |
|
242 | + $birth_date=$person->getEstimatedBirthDate(); |
|
243 | + echo $birth_date->display(true); |
|
244 | + } else { |
|
245 | + echo ' '; |
|
246 | + } |
|
247 | + $birth_dates[0] = new Date(''); |
|
248 | + } |
|
249 | + ?> |
|
250 | 250 | </td> |
251 | 251 | <td><?php echo $birth_date->julianDay();?></td> |
252 | 252 | <td> |
253 | 253 | <?php foreach ($person->getAllBirthPlaces() as $n => $birth_place) { |
254 | - $tmp = new \Fisharebest\Webtrees\Place($birth_place, $person->getTree()); |
|
255 | - if ($n) { ?><br><?php } ?> |
|
254 | + $tmp = new \Fisharebest\Webtrees\Place($birth_place, $person->getTree()); |
|
255 | + if ($n) { ?><br><?php } ?> |
|
256 | 256 | <a href="'<?php echo $tmp->getURL(); ?>" title="<?php echo strip_tags($tmp->getFullName()); ?>"> |
257 | 257 | <?php echo \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($tmp->getShortName()); ?> |
258 | 258 | </a> |
259 | 259 | <?php } ?> |
260 | 260 | </td> |
261 | 261 | <?php if (ModuleManager::getInstance()->isOperational(Constants::MODULE_MAJ_ISSOURCED_NAME)) { |
262 | - $isBSourced = $dperson->isBirthSourced(); ?> |
|
262 | + $isBSourced = $dperson->isBirthSourced(); ?> |
|
263 | 263 | <td><?php echo FunctionsPrint::formatIsSourcedIcon('E', $isBSourced, 'BIRT', 1, 'medium'); ?></td> |
264 | 264 | <td><?php echo $isBSourced; ?></td> |
265 | 265 | <?php } else { ?> |
@@ -269,38 +269,38 @@ discard block |
||
269 | 269 | <td> |
270 | 270 | <?php |
271 | 271 | if ($death_dates = $person->getAllDeathDates()) { |
272 | - foreach ($death_dates as $num => $death_date) { |
|
273 | - if ($num) { ?><br/><?php } ?> |
|
272 | + foreach ($death_dates as $num => $death_date) { |
|
273 | + if ($num) { ?><br/><?php } ?> |
|
274 | 274 | <?php echo $death_date->display(true); |
275 | - } |
|
276 | - } else { |
|
277 | - $death_date = $person->getEstimatedDeathDate(); |
|
278 | - if ($person->getTree()->getPreference('SHOW_EST_LIST_DATES') && $death_date->minimumJulianDay() < WT_CLIENT_JD) { |
|
279 | - echo $death_date->display(true); |
|
280 | - } elseif ($person->isDead()) { |
|
281 | - echo I18N::translate('yes'); |
|
282 | - $death_date = new Date(''); |
|
283 | - } else { |
|
284 | - echo ' '; |
|
285 | - $death_date = new Date(''); |
|
286 | - } |
|
287 | - $death_dates[0] = new Date(''); |
|
288 | - } ?> |
|
275 | + } |
|
276 | + } else { |
|
277 | + $death_date = $person->getEstimatedDeathDate(); |
|
278 | + if ($person->getTree()->getPreference('SHOW_EST_LIST_DATES') && $death_date->minimumJulianDay() < WT_CLIENT_JD) { |
|
279 | + echo $death_date->display(true); |
|
280 | + } elseif ($person->isDead()) { |
|
281 | + echo I18N::translate('yes'); |
|
282 | + $death_date = new Date(''); |
|
283 | + } else { |
|
284 | + echo ' '; |
|
285 | + $death_date = new Date(''); |
|
286 | + } |
|
287 | + $death_dates[0] = new Date(''); |
|
288 | + } ?> |
|
289 | 289 | </td> |
290 | 290 | <td><?php echo $death_date->julianDay(); ?></td> |
291 | 291 | <td><?php echo Date::getAge($birth_dates[0], $death_dates[0], 2); ?></td> |
292 | 292 | <td><?php echo Date::getAge($birth_dates[0], $death_dates[0], 1); ?></td> |
293 | 293 | <td> |
294 | 294 | <?php foreach ($person->getAllDeathPlaces() as $n => $death_place) { |
295 | - $tmp = new Place($death_place, $person->getTree()); |
|
296 | - if ($n) { ?><br><?php } ?> |
|
295 | + $tmp = new Place($death_place, $person->getTree()); |
|
296 | + if ($n) { ?><br><?php } ?> |
|
297 | 297 | <a href="'<?php echo $tmp->getURL(); ?>" title="<?php echo strip_tags($tmp->getFullName()); ?>"> |
298 | 298 | <?php echo \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($tmp->getShortName()); ?> |
299 | 299 | </a> |
300 | 300 | <?php } ?> |
301 | 301 | </td> |
302 | 302 | <?php if (ModuleManager::getInstance()->isOperational(Constants::MODULE_MAJ_ISSOURCED_NAME)) { |
303 | - $isDSourced = $dperson->isDeathSourced(); ?> |
|
303 | + $isDSourced = $dperson->isDeathSourced(); ?> |
|
304 | 304 | <td><?php echo FunctionsPrint::formatIsSourcedIcon('E', $isDSourced, 'DEAT', 1, 'medium'); ?></td> |
305 | 305 | <td><?php echo $isDSourced; ?></td> |
306 | 306 | <?php } else { ?> |
@@ -310,29 +310,29 @@ discard block |
||
310 | 310 | <td><?php echo $person->getSex(); ?></td> |
311 | 311 | <td> |
312 | 312 | <?php if (!$person->canShow() || Date::compare($birth_date, new Date(date('Y') - 100)) > 0) { |
313 | - echo 'Y100'; |
|
314 | - } else { |
|
315 | - echo 'YES'; |
|
316 | - } ?> |
|
313 | + echo 'Y100'; |
|
314 | + } else { |
|
315 | + echo 'YES'; |
|
316 | + } ?> |
|
317 | 317 | </td> |
318 | 318 | <td> |
319 | 319 | <?php if (Date::compare($death_dates[0], new Date(date('Y') - 100)) > 0) { |
320 | - echo 'Y100'; |
|
321 | - } elseif ($death_dates[0]->minimumJulianDay() || $person->isDead()) { |
|
322 | - echo 'YES'; |
|
323 | - } else { |
|
324 | - echo 'N'; |
|
325 | - } ?> |
|
320 | + echo 'Y100'; |
|
321 | + } elseif ($death_dates[0]->minimumJulianDay() || $person->isDead()) { |
|
322 | + echo 'YES'; |
|
323 | + } else { |
|
324 | + echo 'N'; |
|
325 | + } ?> |
|
326 | 326 | </td> |
327 | 327 | <td> |
328 | 328 | <?php if (!$person->getChildFamilies()) { |
329 | - echo 'R'; |
|
329 | + echo 'R'; |
|
330 | 330 | } // roots |
331 | 331 | elseif (!$person->isDead() && $person->getNumberOfChildren() < 1) { |
332 | - echo 'L'; |
|
332 | + echo 'L'; |
|
333 | 333 | } // leaves |
334 | 334 | else { |
335 | - echo ' '; |
|
335 | + echo ' '; |
|
336 | 336 | } ?> |
337 | 337 | </td> |
338 | 338 | </tr> |
@@ -343,12 +343,12 @@ discard block |
||
343 | 343 | <th class="ui-state-default" colspan="22"> |
344 | 344 | <div class="center"> |
345 | 345 | <?php echo I18N::translate('Number of Sosa ancestors: %1$s known / %2$s theoretical (%3$s)', |
346 | - I18N::number($this->data->get('sosa_count')), |
|
347 | - I18N::number($this->data->get('sosa_theo')), |
|
348 | - I18N::percentage($this->data->get('sosa_ratio'),2) |
|
349 | - ); ?> |
|
346 | + I18N::number($this->data->get('sosa_count')), |
|
347 | + I18N::number($this->data->get('sosa_theo')), |
|
348 | + I18N::percentage($this->data->get('sosa_ratio'),2) |
|
349 | + ); ?> |
|
350 | 350 | <?php if($this->data->get('sosa_hidden') > 0) { |
351 | - echo '['. I18N::translate('%s hidden', I18N::number($this->data->get('sosa_hidden'))).']'; |
|
351 | + echo '['. I18N::translate('%s hidden', I18N::number($this->data->get('sosa_hidden'))).']'; |
|
352 | 352 | } ?> |
353 | 353 | </div> |
354 | 354 | </th> |
@@ -382,8 +382,8 @@ discard block |
||
382 | 382 | </div> |
383 | 383 | </div> |
384 | 384 | <?php |
385 | - } |
|
386 | - } |
|
385 | + } |
|
386 | + } |
|
387 | 387 | |
388 | 388 | } |
389 | 389 | |
390 | 390 | \ No newline at end of file |
@@ -32,12 +32,12 @@ discard block |
||
32 | 32 | */ |
33 | 33 | protected function renderContent() { |
34 | 34 | |
35 | - if($this->data->get('has_sosa', false)) { |
|
35 | + if ($this->data->get('has_sosa', false)) { |
|
36 | 36 | $table_id = $this->data->get('table_id'); |
37 | 37 | ?> |
38 | 38 | |
39 | 39 | <div id="sosa-indi-list" class="sosa-list"> |
40 | - <table id="<?php echo $table_id;?>"> |
|
40 | + <table id="<?php echo $table_id; ?>"> |
|
41 | 41 | <thead> |
42 | 42 | <tr> |
43 | 43 | <th colspan="22"> |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | </thead> |
185 | 185 | <tbody> |
186 | 186 | |
187 | - <?php foreach($this->data->get('sosa_list') as $sosa => $person) { |
|
187 | + <?php foreach ($this->data->get('sosa_list') as $sosa => $person) { |
|
188 | 188 | /** @var \Fisharebest\Webtrees\Individual $person */ |
189 | 189 | if ($person->isPendingAddtion()) { |
190 | 190 | $class = ' class="new"'; |
@@ -200,18 +200,18 @@ discard block |
||
200 | 200 | <td class="transparent"><?php echo $person->getXref(); ?></td> |
201 | 201 | <td colspan="2"> |
202 | 202 | <?php foreach ($person->getAllNames() as $num=>$name) { |
203 | - if ($name['type']=='NAME') { |
|
204 | - $title=''; |
|
203 | + if ($name['type'] == 'NAME') { |
|
204 | + $title = ''; |
|
205 | 205 | } else { |
206 | - $title='title="'.strip_tags(GedcomTag::getLabel($name['type'], $person)).'"'; |
|
206 | + $title = 'title="'.strip_tags(GedcomTag::getLabel($name['type'], $person)).'"'; |
|
207 | 207 | } |
208 | - if ($num==$person->getPrimaryName()) { |
|
209 | - $class=' class="name2"'; |
|
210 | - $sex_image=$person->getSexImage(); |
|
211 | - list($surn, $givn)=explode(',', $name['sort']); |
|
208 | + if ($num == $person->getPrimaryName()) { |
|
209 | + $class = ' class="name2"'; |
|
210 | + $sex_image = $person->getSexImage(); |
|
211 | + list($surn, $givn) = explode(',', $name['sort']); |
|
212 | 212 | } else { |
213 | - $class=''; |
|
214 | - $sex_image=''; |
|
213 | + $class = ''; |
|
214 | + $sex_image = ''; |
|
215 | 215 | } ?> |
216 | 216 | <a <?php echo $title.' '.$class; ?> href="<?php echo $person->getHtmlUrl(); ?>"> |
217 | 217 | <?php echo \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($name['full']); ?> |
@@ -224,14 +224,14 @@ discard block |
||
224 | 224 | </td> |
225 | 225 | <td style="display:none;"></td> |
226 | 226 | <td> |
227 | - <?php echo Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)) . 'AAAA' . Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)); ?> |
|
227 | + <?php echo Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)).'AAAA'.Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)); ?> |
|
228 | 228 | </td> |
229 | 229 | <td> |
230 | - <?php echo Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)) . 'AAAA' . Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)); ?> |
|
230 | + <?php echo Filter::escapeHtml(str_replace('@N.N.', 'AAAA', $surn)).'AAAA'.Filter::escapeHtml(str_replace('@P.N.', 'AAAA', $givn)); ?> |
|
231 | 231 | </td> |
232 | 232 | <td> |
233 | 233 | <?php |
234 | - if ($birth_dates=$person->getAllBirthDates()) { |
|
234 | + if ($birth_dates = $person->getAllBirthDates()) { |
|
235 | 235 | foreach ($birth_dates as $num=>$birth_date) { |
236 | 236 | if ($num) { ?><br/><?php } ?> |
237 | 237 | <?php echo $birth_date->display(true); |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | } else { |
240 | 240 | $birth_date = new Date(''); |
241 | 241 | if ($person->getTree()->getPreference('SHOW_EST_LIST_DATES')) { |
242 | - $birth_date=$person->getEstimatedBirthDate(); |
|
242 | + $birth_date = $person->getEstimatedBirthDate(); |
|
243 | 243 | echo $birth_date->display(true); |
244 | 244 | } else { |
245 | 245 | echo ' '; |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | } |
249 | 249 | ?> |
250 | 250 | </td> |
251 | - <td><?php echo $birth_date->julianDay();?></td> |
|
251 | + <td><?php echo $birth_date->julianDay(); ?></td> |
|
252 | 252 | <td> |
253 | 253 | <?php foreach ($person->getAllBirthPlaces() as $n => $birth_place) { |
254 | 254 | $tmp = new \Fisharebest\Webtrees\Place($birth_place, $person->getTree()); |
@@ -345,10 +345,10 @@ discard block |
||
345 | 345 | <?php echo I18N::translate('Number of Sosa ancestors: %1$s known / %2$s theoretical (%3$s)', |
346 | 346 | I18N::number($this->data->get('sosa_count')), |
347 | 347 | I18N::number($this->data->get('sosa_theo')), |
348 | - I18N::percentage($this->data->get('sosa_ratio'),2) |
|
348 | + I18N::percentage($this->data->get('sosa_ratio'), 2) |
|
349 | 349 | ); ?> |
350 | - <?php if($this->data->get('sosa_hidden') > 0) { |
|
351 | - echo '['. I18N::translate('%s hidden', I18N::number($this->data->get('sosa_hidden'))).']'; |
|
350 | + <?php if ($this->data->get('sosa_hidden') > 0) { |
|
351 | + echo '['.I18N::translate('%s hidden', I18N::number($this->data->get('sosa_hidden'))).']'; |
|
352 | 352 | } ?> |
353 | 353 | </div> |
354 | 354 | </th> |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | <button type="button" class="ui-state-default btn-toggle-parents"> |
361 | 361 | <?php echo I18N::translate('Show parents') ?> |
362 | 362 | </button> |
363 | - <button id="btn-toggle-statistics-<?php echo $table_id ;?>" type="button" class="ui-state-default btn-toggle-statistics"> |
|
363 | + <button id="btn-toggle-statistics-<?php echo $table_id; ?>" type="button" class="ui-state-default btn-toggle-statistics"> |
|
364 | 364 | <?php echo I18N::translate('Show statistics charts') ?> |
365 | 365 | </button> |
366 | 366 | </div> |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | * {@inhericDoc} |
25 | 25 | * @see \MyArtJaub\Webtrees\Mvc\View\AbstractView::renderContent() |
26 | 26 | */ |
27 | - protected function renderContent() { |
|
27 | + protected function renderContent() { |
|
28 | 28 | |
29 | - ?> |
|
29 | + ?> |
|
30 | 30 | |
31 | 31 | <div id="maj-sosa-config-page"> |
32 | 32 | <h2><?php echo $this->data->get('title'); ?></h2> |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | </div> |
47 | 47 | <div class="value"> |
48 | 48 | <?php |
49 | - $users = $this->data->get('users_settings'); |
|
50 | - if(count($users) == 1) { |
|
51 | - $root_indi = $users[0]['rootid']; ?> |
|
49 | + $users = $this->data->get('users_settings'); |
|
50 | + if(count($users) == 1) { |
|
51 | + $root_indi = $users[0]['rootid']; ?> |
|
52 | 52 | <label> |
53 | 53 | <input id="maj_sosa_input_userid" type="hidden" name="userid" value="<?php echo $users[0]['user']->getUserId(); ?>" /> |
54 | 54 | <?php echo $users[0]['user']->getRealNameHtml() ?> |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | <?php } else if(count($users) > 1) { ?> |
57 | 57 | <select id='maj-sosa-config-select' name="userid"> |
58 | 58 | <?php |
59 | - $root_indi = $users[0]['rootid']; |
|
60 | - foreach ($this->data->get('users_settings') as $user) { ?> |
|
59 | + $root_indi = $users[0]['rootid']; |
|
60 | + foreach ($this->data->get('users_settings') as $user) { ?> |
|
61 | 61 | <option value="<?php echo $user['user']->getUserId(); ?>"><?php echo $user['user']->getRealNameHtml() ?></option> |
62 | 62 | <?php } ?> |
63 | 63 | </select> |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | </form> |
81 | 81 | |
82 | 82 | <?php |
83 | - } |
|
83 | + } |
|
84 | 84 | |
85 | 85 | } |
86 | 86 | |
87 | 87 | \ No newline at end of file |
@@ -47,13 +47,13 @@ |
||
47 | 47 | <div class="value"> |
48 | 48 | <?php |
49 | 49 | $users = $this->data->get('users_settings'); |
50 | - if(count($users) == 1) { |
|
51 | - $root_indi = $users[0]['rootid']; ?> |
|
50 | + if (count($users) == 1) { |
|
51 | + $root_indi = $users[0]['rootid']; ?> |
|
52 | 52 | <label> |
53 | 53 | <input id="maj_sosa_input_userid" type="hidden" name="userid" value="<?php echo $users[0]['user']->getUserId(); ?>" /> |
54 | 54 | <?php echo $users[0]['user']->getRealNameHtml() ?> |
55 | 55 | </label> |
56 | - <?php } else if(count($users) > 1) { ?> |
|
56 | + <?php } else if (count($users) > 1) { ?> |
|
57 | 57 | <select id='maj-sosa-config-select' name="userid"> |
58 | 58 | <?php |
59 | 59 | $root_indi = $users[0]['rootid']; |