Code Duplication    Length = 9-10 lines in 2 locations

main/inc/lib/tracking.lib.php 2 locations

@@ 7399-7407 (lines=9) @@
7396
            $title_line = get_lang('LoginsTitleMonthColumn').';'.get_lang('LoginsTitleCountColumn')."\n";
7397
            $line = '';
7398
            $total = 0;
7399
            if (is_array($results)) {
7400
                for ($j = 0; $j < count($results); $j++) {
7401
                    $line .= $results[$j][0].';'.$results[$j][1]."\n";
7402
                    $total = $total + $results[$j][1];
7403
                }
7404
                $line .= get_lang('Total').";".$total."\n";
7405
            } else {
7406
                $line = get_lang('NoResult')."</center></td>";
7407
            }
7408
        } else {
7409
            $new_view = substr_replace($view, '1', 0, 1);
7410
        }
@@ 7449-7458 (lines=10) @@
7446
            $results = StatsUtils::getManyResultsXCol($sql, 4);
7447
            $title_line = get_lang('ExercicesTitleExerciceColumn').";".get_lang('Date').';'.get_lang('ExercicesTitleScoreColumn')."\n";
7448
7449
            if (is_array($results)) {
7450
                for ($i = 0; $i < sizeof($results); $i++) {
7451
                    $display_date = api_convert_and_format_date($results[$i][3], null, date_default_timezone_get());
7452
                    $line .= $results[$i][0].";".$display_date.";".$results[$i][1]." / ".$results[$i][2]."\n";
7453
                }
7454
            } else {
7455
                // istvan begin
7456
                $NoTestRes = 1;
7457
            }
7458
7459
            // The Result of Tests
7460
            if (is_array($hpresults)) {
7461
                for ($i = 0; $i < sizeof($hpresults); $i++) {