Code Duplication    Length = 9-9 lines in 2 locations

locallib.php 2 locations

@@ 1271-1279 (lines=9) @@
1268
function bigbluebuttonbn_get_recording_data($bbbsession, $recordings, $tools = ['protect', 'publish', 'delete']) {
1269
    $tabledata = array();
1270
    // Build table content.
1271
    if (isset($recordings) && !array_key_exists('messageKey', $recordings)) {
1272
        // There are recordings for this meeting.
1273
        foreach ($recordings as $recording) {
1274
            $row = bigbluebuttonbn_get_recording_data_row($bbbsession, $recording, $tools);
1275
            if ($row != null) {
1276
                array_push($tabledata, $row);
1277
            }
1278
        }
1279
    }
1280
    return $tabledata;
1281
}
1282
@@ 1305-1313 (lines=9) @@
1302
        $table->size[] = (count($tools) * 40) . 'px';
1303
    }
1304
    // Build table content.
1305
    if (isset($recordings) && !array_key_exists('messageKey', $recordings)) {
1306
        // There are recordings for this meeting.
1307
        foreach ($recordings as $recording) {
1308
            if ( !bigbluebuttonbn_include_recording_table_row($bbbsession, $recording) ) {
1309
                continue;
1310
            }
1311
            bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $tools, $table);
1312
        }
1313
    }
1314
    return $table;
1315
}
1316