@@ -42,13 +42,13 @@ discard block |
||
42 | 42 | |
43 | 43 | <h1><?php echo $this->data->get('title'); ?></h1> |
44 | 44 | |
45 | - <?php if($places_hierarchy['type'] == 'none') { ?> |
|
45 | + <?php if ($places_hierarchy['type'] == 'none') { ?> |
|
46 | 46 | <div class="warning"><?php echo I18N::translate('No place structure could be determined. Please make sure that at least a place exists.'); ?></div> |
47 | 47 | <?php } else { ?> |
48 | 48 | |
49 | 49 | <form class="form-horizontal" name="newform" method="post" role="form" action="<?php echo $this->data->get('save_url'); ?>" autocomplete="off"> |
50 | 50 | <?php echo Filter::getCsrf(); ?> |
51 | - <?php if(!$is_new) { ?> |
|
51 | + <?php if (!$is_new) { ?> |
|
52 | 52 | <input type="hidden" name="ga_id" value="<?php echo $ga->getId(); ?>"> |
53 | 53 | <?php } ?> |
54 | 54 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | <?php echo I18N::translate('Description'); ?> |
59 | 59 | </label> |
60 | 60 | <div class="col-sm-9"> |
61 | - <input class="form-control" type="text" id="description" name="description" required maxlength="70" <?php if(!$is_new) echo 'value="' . Filter::escapeHtml($ga->getTitle()) .'"'; ?> dir="auto"> |
|
61 | + <input class="form-control" type="text" id="description" name="description" required maxlength="70" <?php if (!$is_new) echo 'value="'.Filter::escapeHtml($ga->getTitle()).'"'; ?> dir="auto"> |
|
62 | 62 | <p class="small text-muted"> |
63 | 63 | <?php echo I18N::translate('Description to be given to the geographical dispersion analysis. It will be used as the page title for it.'); ?> |
64 | 64 | </p> |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | <?php echo I18N::translate('Map'); ?> |
102 | 102 | </label> |
103 | 103 | <div class="col-sm-9"> |
104 | - <?php echo FunctionsEdit::selectEditControl('map_file', $this->data->get('map_list') , null, ($is_new || ! $ga->hasMap()) ? '' : base64_encode($ga->getOptions()->getMap()->getFileName()), 'class="form-control"'); ?> |
|
104 | + <?php echo FunctionsEdit::selectEditControl('map_file', $this->data->get('map_list'), null, ($is_new || !$ga->hasMap()) ? '' : base64_encode($ga->getOptions()->getMap()->getFileName()), 'class="form-control"'); ?> |
|
105 | 105 | <p class="small text-muted"> |
106 | 106 | <?php echo I18N::translate('Map outline to be used for the result display.'); ?> |
107 | 107 | </p> |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | <?php echo I18N::translate('Map parent level'); ?> |
115 | 115 | </label> |
116 | 116 | <div class="col-sm-9"> |
117 | - <?php echo FunctionsEdit::selectEditControl('map_top_level', $places_hierarchy['hierarchy'], null, $is_new || ! $ga->hasMap() ? '' : $ga->getOptions()->getMapLevel() - 1, 'class="form-control"'); ?> |
|
117 | + <?php echo FunctionsEdit::selectEditControl('map_top_level', $places_hierarchy['hierarchy'], null, $is_new || !$ga->hasMap() ? '' : $ga->getOptions()->getMapLevel() - 1, 'class="form-control"'); ?> |
|
118 | 118 | <p class="small text-muted"> |
119 | 119 | <?php echo I18N::translate('Subdivision level of the parent subdivision(s) represented by the map.'); ?><br /> |
120 | 120 | <?php echo I18N::translate('For instance, if the map is intended to represent a country by county analysis, then the map parent level would be “Country”, and the analysis level would be “County”.'); ?> |
@@ -41,16 +41,16 @@ discard block |
||
41 | 41 | |
42 | 42 | <h2> |
43 | 43 | <?php echo $tree->getTitleHtml(); ?> |
44 | - <?php if(count($other_trees) > 0) {?> |
|
44 | + <?php if (count($other_trees) > 0) {?> |
|
45 | 45 | <div class="btn-group"> |
46 | 46 | <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> |
47 | 47 | <?php echo I18N::translate('Change tree'); ?> |
48 | 48 | <span class="caret"></span> |
49 | 49 | </button> |
50 | - <?php foreach($other_trees as $other_tree) { ?> |
|
50 | + <?php foreach ($other_trees as $other_tree) { ?> |
|
51 | 51 | <ul class="dropdown-menu" role="menu"> |
52 | 52 | <li> |
53 | - <a href="<?php echo $root_url . '&ged=' . $other_tree->getNameUrl(); ?>"> |
|
53 | + <a href="<?php echo $root_url.'&ged='.$other_tree->getNameUrl(); ?>"> |
|
54 | 54 | <i class="fa fa-fw fa-tree"></i> <?php echo $other_tree->getTitleHtml(); ?> |
55 | 55 | </a> |
56 | 56 | </li> |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | <p> |
64 | 64 | <?php $places_hierarchy = $this->data->get('places_hierarchy'); |
65 | - if($places_hierarchy && $places_hierarchy['type'] != 'none') { |
|
65 | + if ($places_hierarchy && $places_hierarchy['type'] != 'none') { |
|
66 | 66 | switch ($places_hierarchy['type']) { |
67 | 67 | case 'header': |
68 | 68 | echo I18N::translate('According to the GEDCOM header, the places within your file follows the structure: '); |
@@ -76,10 +76,10 @@ discard block |
||
76 | 76 | break; |
77 | 77 | } |
78 | 78 | $str_hierarchy = array(); |
79 | - foreach($places_hierarchy['hierarchy'] as $key => $level) { |
|
79 | + foreach ($places_hierarchy['hierarchy'] as $key => $level) { |
|
80 | 80 | $str_hierarchy[] = I18N::translate('(%d) %s', $key + 1, $level); |
81 | 81 | } |
82 | - echo '<strong>' . implode(I18N::$list_separator, $str_hierarchy) . '</strong>'; |
|
82 | + echo '<strong>'.implode(I18N::$list_separator, $str_hierarchy).'</strong>'; |
|
83 | 83 | } |
84 | 84 | ?> |
85 | 85 | </p> |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | </tbody> |
104 | 104 | </table> |
105 | 105 | |
106 | - <a type="button" class="btn btn-primary" href="<?php echo $root_url . '@add&ged=' . $tree->getNameUrl(); ?>" title="<?php echo I18N::translate('Add'); ?>"> |
|
106 | + <a type="button" class="btn btn-primary" href="<?php echo $root_url.'@add&ged='.$tree->getNameUrl(); ?>" title="<?php echo I18N::translate('Add'); ?>"> |
|
107 | 107 | <i class="fa fa-plus"></i> |
108 | 108 | <?php echo I18N::translate('Add'); ?> |
109 | 109 | </a> |
@@ -71,14 +71,14 @@ discard block |
||
71 | 71 | $data->set('title', $controller->getPageTitle()); |
72 | 72 | $data->set('tree', $wt_tree); |
73 | 73 | |
74 | - $data->set('root_url', 'module.php?mod=' . $this->module->getName() . '&mod_action=AdminConfig'); |
|
74 | + $data->set('root_url', 'module.php?mod='.$this->module->getName().'&mod_action=AdminConfig'); |
|
75 | 75 | |
76 | - $table_id = 'table-geoanalysis-' . Uuid::uuid4(); |
|
76 | + $table_id = 'table-geoanalysis-'.Uuid::uuid4(); |
|
77 | 77 | $data->set('table_id', $table_id); |
78 | 78 | |
79 | 79 | $other_trees = array(); |
80 | 80 | foreach (Tree::getAll() as $tree) { |
81 | - if($tree->getTreeId() != $wt_tree->getTreeId()) $other_trees[] = $tree; |
|
81 | + if ($tree->getTreeId() != $wt_tree->getTreeId()) $other_trees[] = $tree; |
|
82 | 82 | } |
83 | 83 | $data->set('other_trees', $other_trees); |
84 | 84 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | processing: true, |
102 | 102 | serverSide : true, |
103 | 103 | ajax : { |
104 | - url : "module.php?mod='.$this->module->getName().'&mod_action=AdminConfig@jsonGeoAnalysisList&ged='. $wt_tree->getNameUrl().'", |
|
104 | + url : "module.php?mod='.$this->module->getName().'&mod_action=AdminConfig@jsonGeoAnalysisList&ged='.$wt_tree->getNameUrl().'", |
|
105 | 105 | type : "POST" |
106 | 106 | }, |
107 | 107 | columns: [ |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | url: "module.php", |
126 | 126 | type: "GET", |
127 | 127 | data: { |
128 | - mod: "' . $this->module->getName() .'", |
|
128 | + mod: "' . $this->module->getName().'", |
|
129 | 129 | mod_action: "GeoAnalysis@setStatus", |
130 | 130 | ga_id: ga_id, |
131 | 131 | ged: typeof gedcom === "undefined" ? WT_GEDCOM : gedcom, |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | }, |
134 | 134 | error: function(result, stat, error) { |
135 | 135 | var err = typeof result.responseJSON === "undefined" ? error : result.responseJSON.error; |
136 | - alert("' . I18N::translate('An error occured while editing this analysis:') . '" + err); |
|
136 | + alert("' . I18N::translate('An error occured while editing this analysis:').'" + err); |
|
137 | 137 | }, |
138 | 138 | complete: function(result, stat) { |
139 | 139 | geoAnalysisTable.ajax.reload(null, false); |
@@ -146,14 +146,14 @@ discard block |
||
146 | 146 | url: "module.php", |
147 | 147 | type: "GET", |
148 | 148 | data: { |
149 | - mod: "' . $this->module->getName() .'", |
|
149 | + mod: "' . $this->module->getName().'", |
|
150 | 150 | mod_action: "GeoAnalysis@delete", |
151 | 151 | ga_id: ga_id, |
152 | 152 | ged: typeof gedcom === "undefined" ? WT_GEDCOM : gedcom |
153 | 153 | }, |
154 | 154 | error: function(result, stat, error) { |
155 | 155 | var err = typeof result.responseJSON === "undefined" ? error : result.responseJSON.error; |
156 | - alert("' . I18N::translate('An error occured while deleting this analysis:') . '" + err); |
|
156 | + alert("' . I18N::translate('An error occured while deleting this analysis:').'" + err); |
|
157 | 157 | }, |
158 | 158 | complete: function(result, stat) { |
159 | 159 | geoAnalysisTable.ajax.reload(null, false); |
@@ -177,13 +177,13 @@ discard block |
||
177 | 177 | |
178 | 178 | // Generate an AJAX/JSON response for datatables to load a block of rows |
179 | 179 | $search = Filter::postArray('search'); |
180 | - if($search) $search = $search['value']; |
|
180 | + if ($search) $search = $search['value']; |
|
181 | 181 | $start = Filter::postInteger('start'); |
182 | 182 | $length = Filter::postInteger('length'); |
183 | 183 | $order = Filter::postArray('order'); |
184 | 184 | |
185 | - foreach($order as $key => &$value) { |
|
186 | - switch($value['column']) { |
|
185 | + foreach ($order as $key => &$value) { |
|
186 | + switch ($value['column']) { |
|
187 | 187 | case 3: |
188 | 188 | $value['column'] = 'majgd_descr'; |
189 | 189 | break; |
@@ -204,11 +204,11 @@ discard block |
||
204 | 204 | |
205 | 205 | $data = array(); |
206 | 206 | $place_hierarchy = $this->provider->getPlacesHierarchy(); |
207 | - foreach($list as $ga) { |
|
207 | + foreach ($list as $ga) { |
|
208 | 208 | /** @var GeoAnalysis $ga */ |
209 | 209 | |
210 | 210 | $datum = array(); |
211 | - $options= $ga->getOptions(); |
|
211 | + $options = $ga->getOptions(); |
|
212 | 212 | |
213 | 213 | $datum[0] = ' |
214 | 214 | <div class="btn-group"> |
@@ -218,47 +218,46 @@ discard block |
||
218 | 218 | <ul class="dropdown-menu" role="menu"> |
219 | 219 | <li> |
220 | 220 | <a href="#" onclick="return set_geoanalysis_status('. $ga->getId().', '.($ga->isEnabled() ? 'false' : 'true').', \''.Filter::escapeJs($wt_tree->getName()).'\');"> |
221 | - <i class="fa fa-fw '.($ga->isEnabled() ? 'fa-times' : 'fa-check').'"></i> ' . ($ga->isEnabled() ? I18N::translate('Disable') : I18N::translate('Enable')) . ' |
|
221 | + <i class="fa fa-fw '.($ga->isEnabled() ? 'fa-times' : 'fa-check').'"></i> '.($ga->isEnabled() ? I18N::translate('Disable') : I18N::translate('Enable')).' |
|
222 | 222 | </a> |
223 | 223 | </li> |
224 | 224 | <li> |
225 | 225 | <a href="module.php?mod='.$this->module->getName().'&mod_action=AdminConfig@edit&ga_id='.$ga->getId().'&ged='.$wt_tree->getName().'"> |
226 | - <i class="fa fa-fw fa-pencil"></i> ' . I18N::translate('Edit') . ' |
|
226 | + <i class="fa fa-fw fa-pencil"></i> ' . I18N::translate('Edit').' |
|
227 | 227 | </a> |
228 | 228 | </li> |
229 | 229 | <li class="divider" /> |
230 | 230 | <li> |
231 | 231 | <a href="#" onclick="return delete_geoanalysis('. $ga->getId().', \''.Filter::escapeJs($wt_tree->getName()).'\');"> |
232 | - <i class="fa fa-fw fa-trash-o"></i> ' . I18N::translate('Delete') . ' |
|
232 | + <i class="fa fa-fw fa-trash-o"></i> ' . I18N::translate('Delete').' |
|
233 | 233 | </a> |
234 | 234 | </li> |
235 | 235 | </ul> |
236 | 236 | </div>'; |
237 | 237 | $datum[1] = $ga->getId(); |
238 | 238 | $datum[2] = $ga->isEnabled() ? |
239 | - '<i class="fa fa-check"></i><span class="sr-only">'.I18N::translate('Enabled').'</span>' : |
|
240 | - '<i class="fa fa-times"></i><span class="sr-only">'.I18N::translate('Disabled').'</span>'; |
|
239 | + '<i class="fa fa-check"></i><span class="sr-only">'.I18N::translate('Enabled').'</span>' : '<i class="fa fa-times"></i><span class="sr-only">'.I18N::translate('Disabled').'</span>'; |
|
241 | 240 | $datum[3] = $ga->getTitle(); |
242 | 241 | $analysis_level = $ga->getAnalysisLevel(); |
243 | - if($place_hierarchy['type'] == 'header') { |
|
242 | + if ($place_hierarchy['type'] == 'header') { |
|
244 | 243 | $datum[4] = $place_hierarchy['hierarchy'][$analysis_level - 1]; |
245 | 244 | } elseif ($place_hierarchy['type'] == 'data') { |
246 | - $datum[4] = $analysis_level . ' (' . $place_hierarchy['hierarchy'][$analysis_level - 1] . ')'; |
|
245 | + $datum[4] = $analysis_level.' ('.$place_hierarchy['hierarchy'][$analysis_level - 1].')'; |
|
247 | 246 | } else { |
248 | 247 | $datum[4] = $analysis_level; |
249 | 248 | } |
250 | 249 | $datum[5] = $ga->getAnalysisLevel(); |
251 | 250 | $datum[6] = '<i class="fa fa-times"></i><span class="sr-only">'.I18N::translate('None').'</span>'; |
252 | 251 | $datum[7] = '<i class="fa fa-times"></i><span class="sr-only">'.I18N::translate('None').'</span>'; |
253 | - if($ga->hasMap()) { |
|
254 | - if($options->getMap()->isLoaded()) { |
|
252 | + if ($ga->hasMap()) { |
|
253 | + if ($options->getMap()->isLoaded()) { |
|
255 | 254 | $datum[6] = $options->getMap()->getDescription(); |
256 | - $datum[7] = '<span data-toggle="tooltip" title="' . $options->getMap()->getTopLevelName() . '" />'; |
|
255 | + $datum[7] = '<span data-toggle="tooltip" title="'.$options->getMap()->getTopLevelName().'" />'; |
|
257 | 256 | $top_level = $options->getMapLevel(); |
258 | - if($place_hierarchy['type'] == 'header') { |
|
257 | + if ($place_hierarchy['type'] == 'header') { |
|
259 | 258 | $datum[7] .= $place_hierarchy['hierarchy'][$top_level - 1]; |
260 | 259 | } elseif ($place_hierarchy['type'] == 'data') { |
261 | - $datum[7] .= $top_level . ' (' . $place_hierarchy['hierarchy'][$top_level - 1] . ')'; |
|
260 | + $datum[7] .= $top_level.' ('.$place_hierarchy['hierarchy'][$top_level - 1].')'; |
|
262 | 261 | } else { |
263 | 262 | $datum[7] .= $top_level; |
264 | 263 | } |
@@ -269,8 +268,7 @@ discard block |
||
269 | 268 | } |
270 | 269 | } |
271 | 270 | $datum[8] = $options->isUsingFlags() ? |
272 | - '<i class="fa fa-check"></i><span class="sr-only">'.I18N::translate('Yes').'</span>' : |
|
273 | - '<i class="fa fa-times"></i><span class="sr-only">'.I18N::translate('No').'</span>'; |
|
271 | + '<i class="fa fa-check"></i><span class="sr-only">'.I18N::translate('Yes').'</span>' : '<i class="fa fa-times"></i><span class="sr-only">'.I18N::translate('No').'</span>'; |
|
274 | 272 | $datum[9] = $options->getMaxDetailsInGen() > 0 ? $options->getMaxDetailsInGen() : I18N::translate('All'); |
275 | 273 | |
276 | 274 | $data[] = $datum; |
@@ -319,24 +317,24 @@ discard block |
||
319 | 317 | $description = Filter::post('description'); |
320 | 318 | $analysislevel = Filter::postInteger('analysislevel'); |
321 | 319 | $use_map = Filter::postBool('use_map'); |
322 | - if($use_map) { |
|
320 | + if ($use_map) { |
|
323 | 321 | $map_file = base64_decode(Filter::post('map_file')); |
324 | - $map_top_level = Filter::postInteger('map_top_level'); |
|
322 | + $map_top_level = Filter::postInteger('map_top_level'); |
|
325 | 323 | } |
326 | 324 | $use_flags = Filter::postBool('use_flags'); |
327 | 325 | $gen_details = Filter::postInteger('gen_details'); |
328 | 326 | |
329 | 327 | $success = false; |
330 | - if($ga_id) { |
|
328 | + if ($ga_id) { |
|
331 | 329 | $ga = $this->provider->getGeoAnalysis($ga_id, false); |
332 | - if($ga) { |
|
330 | + if ($ga) { |
|
333 | 331 | $ga->setTitle($description); |
334 | 332 | $ga->setAnalysisLevel($analysislevel + 1); |
335 | 333 | $options = $ga->getOptions(); |
336 | - if($options) { |
|
334 | + if ($options) { |
|
337 | 335 | $options->setUsingFlags($use_flags); |
338 | 336 | $options->setMaxDetailsInGen($gen_details); |
339 | - if($use_map) { |
|
337 | + if ($use_map) { |
|
340 | 338 | $options->setMap(new OutlineMap($map_file)); |
341 | 339 | $options->setMapLevel($map_top_level + 1); |
342 | 340 | } |
@@ -346,7 +344,7 @@ discard block |
||
346 | 344 | } |
347 | 345 | |
348 | 346 | $res = $this->provider->updateGeoAnalysis($ga); |
349 | - if($res) { |
|
347 | + if ($res) { |
|
350 | 348 | FlashMessages::addMessage(I18N::translate('The geographical dispersion analysis “%s” has been successfully updated', $res->getTitle()), 'success'); |
351 | 349 | Log::addConfigurationLog('Module '.$this->module->getName().' : Geo Analysis ID “'.$res->getId().'” has been updated.'); |
352 | 350 | $ga = $res; |
@@ -354,7 +352,7 @@ discard block |
||
354 | 352 | } |
355 | 353 | else { |
356 | 354 | FlashMessages::addMessage(I18N::translate('An error occured while updating the geographical dispersion analysis “%s”', $ga->getTitle()), 'danger'); |
357 | - Log::addConfigurationLog('Module '.$this->module->getName().' : Geo Analysis ID “'. $ga->getId() .'” could not be updated. See error log.'); |
|
355 | + Log::addConfigurationLog('Module '.$this->module->getName().' : Geo Analysis ID “'.$ga->getId().'” could not be updated. See error log.'); |
|
358 | 356 | } |
359 | 357 | } |
360 | 358 | } else { |
@@ -366,7 +364,7 @@ discard block |
||
366 | 364 | $use_flags, |
367 | 365 | $gen_details |
368 | 366 | ); |
369 | - if($ga) { |
|
367 | + if ($ga) { |
|
370 | 368 | FlashMessages::addMessage(I18N::translate('The geographical dispersion analysis “%s” has been successfully added.', $ga->getTitle()), 'success'); |
371 | 369 | Log::addConfigurationLog('Module '.$this->module->getName().' : Geo Analysis ID “'.$ga->getId().'” has been added.'); |
372 | 370 | $success = true; |
@@ -377,16 +375,16 @@ discard block |
||
377 | 375 | } |
378 | 376 | } |
379 | 377 | |
380 | - $redirection_url = 'module.php?mod=' . $this->module->getName() . '&mod_action=AdminConfig&ged=' . $wt_tree->getNameUrl(); |
|
381 | - if(!$success) { |
|
382 | - if($ga) { |
|
383 | - $redirection_url = 'module.php?mod=' . $this->module->getName() . '&mod_action=AdminConfig@edit&ga_id='. $ga->getId() .'&ged=' . $wt_tree->getNameUrl(); |
|
378 | + $redirection_url = 'module.php?mod='.$this->module->getName().'&mod_action=AdminConfig&ged='.$wt_tree->getNameUrl(); |
|
379 | + if (!$success) { |
|
380 | + if ($ga) { |
|
381 | + $redirection_url = 'module.php?mod='.$this->module->getName().'&mod_action=AdminConfig@edit&ga_id='.$ga->getId().'&ged='.$wt_tree->getNameUrl(); |
|
384 | 382 | } |
385 | 383 | else { |
386 | - $redirection_url = 'module.php?mod=' . $this->module->getName() . '&mod_action=AdminConfig@add&ged=' . $wt_tree->getNameUrl(); |
|
384 | + $redirection_url = 'module.php?mod='.$this->module->getName().'&mod_action=AdminConfig@add&ged='.$wt_tree->getNameUrl(); |
|
387 | 385 | } |
388 | 386 | } |
389 | - header('Location: ' . WT_BASE_URL . $redirection_url); |
|
387 | + header('Location: '.WT_BASE_URL.$redirection_url); |
|
390 | 388 | |
391 | 389 | } |
392 | 390 | |
@@ -416,7 +414,7 @@ discard block |
||
416 | 414 | '); |
417 | 415 | |
418 | 416 | $data = new ViewBag(); |
419 | - if($ga) { |
|
417 | + if ($ga) { |
|
420 | 418 | $controller->setPageTitle(I18N::translate('Edit the geographical dispersion analysis')); |
421 | 419 | $data->set('geo_analysis', $ga); |
422 | 420 | } else { |
@@ -424,9 +422,9 @@ discard block |
||
424 | 422 | } |
425 | 423 | |
426 | 424 | $data->set('title', $controller->getPageTitle()); |
427 | - $data->set('admin_config_url', 'module.php?mod=' . $this->module->getName() . '&mod_action=AdminConfig&ged=' . $wt_tree->getNameUrl()); |
|
425 | + $data->set('admin_config_url', 'module.php?mod='.$this->module->getName().'&mod_action=AdminConfig&ged='.$wt_tree->getNameUrl()); |
|
428 | 426 | $data->set('module_title', $this->module->getTitle()); |
429 | - $data->set('save_url', 'module.php?mod=' . $this->module->getName() . '&mod_action=AdminConfig@save&ged=' . $wt_tree->getNameUrl()); |
|
427 | + $data->set('save_url', 'module.php?mod='.$this->module->getName().'&mod_action=AdminConfig@save&ged='.$wt_tree->getNameUrl()); |
|
430 | 428 | $data->set('places_hierarchy', $this->provider->getPlacesHierarchy()); |
431 | 429 | |
432 | 430 | $map_list = array_map( |
@@ -439,7 +437,7 @@ discard block |
||
439 | 437 | $data->set('map_list', $map_list); |
440 | 438 | |
441 | 439 | $gen_details = array(0 => I18N::translate('All')); |
442 | - for($i = 1; $i <= 10 ; $i++) $gen_details[$i] = $i; |
|
440 | + for ($i = 1; $i <= 10; $i++) $gen_details[$i] = $i; |
|
443 | 441 | $data->set('generation_details', $gen_details); |
444 | 442 | |
445 | 443 | ViewFactory::make('GeoAnalysisEdit', $this, $controller, $data)->render(); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | public function addFamily(Family $fams): object |
69 | 69 | { |
70 | 70 | if (!$this->linked_fams->has($fams->xref())) { |
71 | - $this->linked_fams->put($fams->xref(), (object) [ |
|
71 | + $this->linked_fams->put($fams->xref(), (object)[ |
|
72 | 72 | 'family' => $fams, |
73 | 73 | 'children' => new Collection() |
74 | 74 | ]); |
@@ -135,6 +135,6 @@ discard block |
||
135 | 135 | */ |
136 | 136 | public function hasFollowUpSurname(): bool |
137 | 137 | { |
138 | - return mb_strlen($this->followUpSurname()) > 0 ; |
|
138 | + return mb_strlen($this->followUpSurname()) > 0; |
|
139 | 139 | } |
140 | 140 | } |
@@ -107,7 +107,7 @@ |
||
107 | 107 | } |
108 | 108 | } |
109 | 109 | |
110 | - return $root_lineages->sort(function (LineageRootNode $a, LineageRootNode $b) { |
|
110 | + return $root_lineages->sort(function(LineageRootNode $a, LineageRootNode $b) { |
|
111 | 111 | |
112 | 112 | if ($a->numberChildNodes() == $b->numberChildNodes()) { |
113 | 113 | return 0; |
@@ -56,7 +56,7 @@ |
||
56 | 56 | |
57 | 57 | $token = Functions::generateRandomToken(); |
58 | 58 | $this->module->setPreference('MAJ_AT_FORCE_EXEC_TOKEN', $token); |
59 | - Log::addConfigurationLog($this->module->title() . ' : New token generated.'); |
|
59 | + Log::addConfigurationLog($this->module->title().' : New token generated.'); |
|
60 | 60 | |
61 | 61 | return response(['token' => $token]); |
62 | 62 | } |
@@ -73,7 +73,7 @@ |
||
73 | 73 | $this->module->setPreference('PAT_FORCE_EXEC_TOKEN', $token); |
74 | 74 | } |
75 | 75 | |
76 | - return $this->viewResponse($this->module->name() . '::admin/config', [ |
|
76 | + return $this->viewResponse($this->module->name().'::admin/config', [ |
|
77 | 77 | 'title' => $this->module->title(), |
78 | 78 | 'trigger_token' => $token, |
79 | 79 | 'trigger_route' => route(TaskTrigger::class, ['task' => '__TASKNAME__', 'force' => '__TOKEN__']), |
@@ -61,11 +61,11 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public function loadRoutes(Map $router): void |
63 | 63 | { |
64 | - $router->attach('', '', static function (Map $router): void { |
|
64 | + $router->attach('', '', static function(Map $router): void { |
|
65 | 65 | |
66 | - $router->attach('', '/module-maj/lineages', static function (Map $router): void { |
|
66 | + $router->attach('', '/module-maj/lineages', static function(Map $router): void { |
|
67 | 67 | |
68 | - $router->attach('', '/Page', static function (Map $router): void { |
|
68 | + $router->attach('', '/Page', static function(Map $router): void { |
|
69 | 69 | |
70 | 70 | $router->get(SurnamesList::class, '/{tree}/list{/alpha}', SurnamesList::class); |
71 | 71 | $router->get(LineagesPage::class, '/{tree}/lineage/{surname}', LineagesPage::class); |
@@ -122,6 +122,6 @@ discard block |
||
122 | 122 | */ |
123 | 123 | public function headContent(): string |
124 | 124 | { |
125 | - return '<link rel="stylesheet" href="' . e($this->moduleCssUrl()) . '">'; |
|
125 | + return '<link rel="stylesheet" href="'.e($this->moduleCssUrl()).'">'; |
|
126 | 126 | } |
127 | 127 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | //How to update the database schema for this module |
52 | 52 | private const SCHEMA_TARGET_VERSION = 2; |
53 | 53 | private const SCHEMA_SETTING_NAME = 'MAJ_ADMTASKS_SCHEMA_VERSION'; |
54 | - private const SCHEMA_MIGRATION_PREFIX = __NAMESPACE__ . '\Schema'; |
|
54 | + private const SCHEMA_MIGRATION_PREFIX = __NAMESPACE__.'\Schema'; |
|
55 | 55 | |
56 | 56 | /** |
57 | 57 | * {@inheritDoc} |
@@ -91,11 +91,11 @@ discard block |
||
91 | 91 | */ |
92 | 92 | public function loadRoutes(Map $router): void |
93 | 93 | { |
94 | - $router->attach('', '', static function (Map $router): void { |
|
94 | + $router->attach('', '', static function(Map $router): void { |
|
95 | 95 | |
96 | - $router->attach('', '/module-maj/admintasks', static function (Map $router): void { |
|
96 | + $router->attach('', '/module-maj/admintasks', static function(Map $router): void { |
|
97 | 97 | |
98 | - $router->attach('', '/admin', static function (Map $router): void { |
|
98 | + $router->attach('', '/admin', static function(Map $router): void { |
|
99 | 99 | |
100 | 100 | $router->extras([ |
101 | 101 | 'middleware' => [ |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | ]); |
105 | 105 | $router->get(AdminConfigPage::class, '/config', AdminConfigPage::class); |
106 | 106 | |
107 | - $router->attach('', '/tasks', static function (Map $router): void { |
|
107 | + $router->attach('', '/tasks', static function(Map $router): void { |
|
108 | 108 | |
109 | 109 | $router->get(TasksList::class, '', TasksList::class); |
110 | 110 | $router->get(TaskEditPage::class, '/{task}', TaskEditPage::class); |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | */ |
147 | 147 | public function bodyContent(): string |
148 | 148 | { |
149 | - return view($this->name() . '::snippet', [ 'url' => route(TaskTrigger::class) ]); |
|
149 | + return view($this->name().'::snippet', ['url' => route(TaskTrigger::class)]); |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | /** |