Code Duplication    Length = 8-8 lines in 4 locations

src/filters/modify.php 2 locations

@@ 385-392 (lines=8) @@
382
    ? dal_query('filters/membersx2.sql', $_SESSION[VAR_USERID], $id, FILTER_FLAG_CREATED_BY)
383
    : dal_query('filters/membersx.sql',  $project_id,           $id, FILTER_FLAG_CREATED_BY);
384
385
while (($row = $rs->fetch()))
386
{
387
    $xml .= ($row['is_selected']
388
                ? '<listitem value="' . $row['account_id'] . '" selected="true">'
389
                : '<listitem value="' . $row['account_id'] . '">')
390
          . ustr2html(sprintf('%s (%s)', $row['fullname'], account_get_username($row['username'])))
391
          . '</listitem>';
392
}
393
394
$xml .= '</listbox>'
395
      . '</control>'
@@ 412-419 (lines=8) @@
409
    ? dal_query('filters/membersx2.sql', $_SESSION[VAR_USERID], $id, FILTER_FLAG_ASSIGNED_TO)
410
    : dal_query('filters/membersx.sql',  $project_id,           $id, FILTER_FLAG_ASSIGNED_TO);
411
412
while (($row = $rs->fetch()))
413
{
414
    $xml .= ($row['is_selected']
415
                ? '<listitem value="' . $row['account_id'] . '" selected="true">'
416
                : '<listitem value="' . $row['account_id'] . '">')
417
          . ustr2html(sprintf('%s (%s)', $row['fullname'], account_get_username($row['username'])))
418
          . '</listitem>';
419
}
420
421
$xml .= '</listbox>'
422
      . '</control>'

src/records/create.php 1 location

@@ 486-493 (lines=8) @@
483
                      . '<label>' . get_html_resource(RES_RESPONSIBLE_ID) . '</label>'
484
                      . '<combobox>';
485
486
                while (($row = $rs->fetch()))
487
                {
488
                    $xml .= ($row['account_id'] == $responsible_id
489
                                ? '<listitem value="' . $row['account_id'] . '" selected="true">'
490
                                : '<listitem value="' . $row['account_id'] . '">')
491
                          . ustr2html(sprintf('%s (%s)', $row['fullname'], account_get_username($row['username'])))
492
                          . '</listitem>';
493
                }
494
495
                $xml .= '</combobox>'
496
                      . '</control>';

src/records/state.php 1 location

@@ 297-304 (lines=8) @@
294
                  . '<label>' . get_html_resource(RES_RESPONSIBLE_ID) . '</label>'
295
                  . '<combobox>';
296
297
            while (($row = $rs_res->fetch()))
298
            {
299
                $xml .= ($row['account_id'] == $default_responsible
300
                            ? '<listitem value="' . $row['account_id'] . '" selected="true">'
301
                            : '<listitem value="' . $row['account_id'] . '">')
302
                      . ustr2html(sprintf('%s (%s)', $row['fullname'], account_get_username($row['username'])))
303
                      . '</listitem>';
304
            }
305
306
            $xml .= '</combobox>'
307
                  . '</control>';