Code Duplication    Length = 12-12 lines in 2 locations

locallib.php 1 location

@@ 1502-1513 (lines=12) @@
1499
    $meetingID = '';
1500
    if ( is_numeric($courseID) ) {
1501
        $results = bigbluebuttonbn_getRecordedMeetings($courseID);
1502
        if( $results ) {
1503
            //Eliminates duplicates
1504
            $mIDs = array();
1505
            foreach ($results as $result) {
1506
                $mIDs[$result->meetingid] = $result->meetingid;
1507
            }
1508
            //Generates the meetingID string
1509
            foreach ($mIDs as $mID) {
1510
                if (strlen($meetingID) > 0) $meetingID .= ',';
1511
                $meetingID .= $mID;
1512
            }
1513
        }
1514
    }
1515
1516
    // If there were meetingIDs excecute the getRecordings request

view.php 1 location

@@ 357-368 (lines=12) @@
354
        //    $results = array_merge($results, $results_deleted);
355
        //}
356
357
        if( $results ){
358
            //Eliminates duplicates
359
            $mIDs = array();
360
            foreach ($results as $result) {
361
                $mIDs[$result->meetingid] = $result->meetingid;
362
            }
363
            //Generates the meetingID string
364
            foreach ($mIDs as $mID) {
365
                if (strlen($meetingID) > 0) $meetingID .= ',';
366
                $meetingID .= $mID;
367
            }
368
        }
369
370
        // Get actual recordings
371
        //$recordings = bigbluebuttonbn_getRecordingsArray($bbbsession['meetingid'], $bbbsession['endpoint'], $bbbsession['shared_secret']);