You are here

function views_calc_adj_full_alias in Views Calc 7

Edge case if the same field has been used more than once, most likely with relationships since you could show title for each relationship. Results in a field like title becoming title_1.

1 call to views_calc_adj_full_alias()
views_calc_table_total in ./theme.inc
Build total var line.

File

./views_calc.module, line 590
This module will allow you to add calculated fields to views tables and compute (SUM, COUNT, AVG, etc) columns of numeric data in a views table.

Code

function views_calc_adj_full_alias($alias, $field) {
  if ($field->field != $field->options['id']) {
    $addition = str_replace($field->field, '', $field->options['id']) . '_';
    $ext_alias = $field->relationship . $addition . $field->real_field;
    $ext_alias = views_calc_shorten($ext_alias);
    return $ext_alias;
  }
  return $alias;
}