Code Duplication    Length = 9-9 lines in 2 locations

locallib.php 2 locations

@@ 1706-1714 (lines=9) @@
1703
function bigbluebuttonbn_get_recording_data($bbbsession, $recordings, $tools = ['protect', 'publish', 'delete']) {
1704
    $tabledata = array();
1705
    // Build table content.
1706
    if (isset($recordings) && !array_key_exists('messageKey', $recordings)) {
1707
        // There are recordings for this meeting.
1708
        foreach ($recordings as $recording) {
1709
            $row = bigbluebuttonbn_get_recording_data_row($bbbsession, $recording, $tools);
1710
            if ($row != null) {
1711
                array_push($tabledata, $row);
1712
            }
1713
        }
1714
    }
1715
    return $tabledata;
1716
}
1717
@@ 1749-1757 (lines=9) @@
1746
        $table->size[] = (count($tools) * 40) . 'px';
1747
    }
1748
    // Build table content.
1749
    if (isset($recordings) && !array_key_exists('messageKey', $recordings)) {
1750
        // There are recordings for this meeting.
1751
        foreach ($recordings as $recording) {
1752
            if ( !bigbluebuttonbn_include_recording_table_row($bbbsession, $recording) ) {
1753
                continue;
1754
            }
1755
            bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $tools, $table);
1756
        }
1757
    }
1758
    return $table;
1759
}
1760