Revision 262f020c
Added by Andreas Kohlbecker over 2 years ago
modules/cdm_dataportal/cdm_dataportal.install | ||
---|---|---|
496 | 496 |
return join(', ', $tasks_performed); |
497 | 497 |
}; |
498 | 498 |
|
499 |
/** |
|
500 |
* update for RELEASE 5.27: |
|
501 |
* - transform old DISTRIBUTION_HIERARCHY_STYLE params to the new scheme, see https://dev.e-taxonomy.eu/redmine/issues/9756 |
|
502 |
* |
|
503 |
*/ |
|
504 |
function cdm_dataportal_update_7700() |
|
505 |
{ |
|
506 |
$tasks_performed = array(); |
|
507 |
|
|
508 |
$dist_hierarchy_style = variable_get(DISTRIBUTION_HIERARCHY_STYLE); |
|
509 |
if(isset_not_empty($dist_hierarchy_style)){ |
|
510 |
if(isset($dist_hierarchy_style['level_0'])) { |
|
511 |
if (isset($dist_hierarchy_style['level_0']['label_suffix']) |
|
512 |
&& str_beginsWith($dist_hierarchy_style['level_0']['label_suffix'], ':')) { |
|
513 |
$dist_hierarchy_style['level_0']['item_suffix'] = $dist_hierarchy_style['level_0']['label_suffix']; |
|
514 |
$dist_hierarchy_style['level_0']['label_suffix'] = ''; |
|
515 |
} |
|
516 |
if (!isset($dist_hierarchy_style['level_0']['item_suffix'])){ |
|
517 |
$dist_hierarchy_style['level_0']['item_suffix'] = ''; |
|
518 |
} |
|
519 |
$dist_hierarchy_style['level_1']['item_suffix'] = ''; |
|
520 |
$dist_hierarchy_style['level_2']['item_suffix'] = ''; |
|
521 |
} |
|
522 |
_modify_variable(DISTRIBUTION_HIERARCHY_STYLE, $dist_hierarchy_style); |
|
523 |
$tasks_performed[] = DISTRIBUTION_HIERARCHY_STYLE . " variable updated"; |
|
524 |
} |
|
525 |
|
|
526 |
|
|
527 |
return join(', ', $tasks_performed); |
|
528 |
} |
|
529 |
|
|
499 | 530 |
/* ======================================================================== */ |
500 | 531 |
|
501 | 532 |
/** |
modules/cdm_dataportal/includes/descriptions.inc | ||
---|---|---|
1868 | 1868 |
} |
1869 | 1869 |
} |
1870 | 1870 |
|
1871 |
$per_node_markup[$node_index] .= $level_style['item_suffix']; |
|
1872 |
|
|
1871 | 1873 |
if(isset($node->children[0])){ |
1872 | 1874 |
_compose_distribution_hierarchy( |
1873 | 1875 |
$node->children, |
modules/cdm_dataportal/settings.php | ||
---|---|---|
335 | 335 |
define('DISTRIBUTION_HIERARCHY_STYLE', 'distribution_hierarchy_style'); |
336 | 336 |
define('DISTRIBUTION_HIERARCHY_STYLE_DEFAULT', serialize(array( |
337 | 337 |
"level_0" => array( |
338 |
'label_suffix' => ': ',
|
|
338 |
'label_suffix' => '', |
|
339 | 339 |
'status_glue' => '', |
340 |
'item_suffix' => ': ', |
|
340 | 341 |
'item_glue' => ' ', |
341 | 342 |
'item_group_prefix' => '', |
342 | 343 |
'item_group_postfix' => '' |
... | ... | |
344 | 345 |
"level_1" => array( |
345 | 346 |
'label_suffix' => '', |
346 | 347 |
'status_glue' => '‒ ', // '‒ ' |
348 |
'item_suffix' => '', |
|
347 | 349 |
'item_glue' => '; ', |
348 | 350 |
'item_group_prefix' => '', |
349 | 351 |
'item_group_postfix' => '' |
... | ... | |
351 | 353 |
"level_2" => array( |
352 | 354 |
'label_suffix' => '', |
353 | 355 |
'status_glue' => '‒ ', // '‒ ' |
356 |
'item_suffix' => '', |
|
354 | 357 |
'item_glue' => ', ', |
355 | 358 |
'item_group_prefix' => ' (', |
356 | 359 |
'item_group_postfix' => ')' |
Also available in: Unified diff
ref #8936 introducing additional hierarchical distribution style parameter + migration of old styles