Code Duplication    Length = 12-12 lines in 2 locations

src/views/columns.php 1 location

@@ 265-276 (lines=12) @@
262
263
foreach ($columns as $column)
264
{
265
    if ($column['column_type'] >= COLUMN_TYPE_MINIMUM &&
266
        $column['column_type'] <= COLUMN_TYPE_MAXIMUM)
267
    {
268
        $text = get_html_resource($column_type_res[$column['column_type']]);
269
    }
270
    else
271
    {
272
        $text = ustr2html(sprintf('%s: %s (%s)',
273
                                  $column['state_name'],
274
                                  $column['field_name'],
275
                                  get_html_resource($column_type_res[$column['column_type']])));
276
    }
277
278
    $xml .= '<listitem value="' . $column['column_id'] . '">' . $text . '</listitem>';
279
}

src/views/move.php 1 location

@@ 70-81 (lines=12) @@
67
68
    foreach ($list as $item)
69
    {
70
        if ($item['column_type'] >= COLUMN_TYPE_MINIMUM &&
71
            $item['column_type'] <= COLUMN_TYPE_MAXIMUM)
72
        {
73
            $text = get_html_resource($column_type_res[$item['column_type']]);
74
        }
75
        else
76
        {
77
            $text = ustr2html(sprintf('%s: %s (%s)',
78
                                      $item['state_name'],
79
                                      $item['field_name'],
80
                                      get_html_resource($column_type_res[$item['column_type']])));
81
        }
82
83
        $xml .= ($item['column_id'] == $id
84
                    ? '<listitem value="' . $item['column_id'] . '" selected="true">'