Code Duplication    Length = 6-6 lines in 2 locations

locallib.php 2 locations

@@ 179-184 (lines=6) @@
176
        }
177
        return $meetings;
178
179
    } else if( $xml ) { //If the xml packet returned failure it displays the message to the user
180
        return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey);
181
182
    } else { //If the server is unreachable, then prompts the user of the necessary action
183
        return null;
184
    }
185
}
186
187
function bigbluebuttonbn_getMeetingInfo( $meetingID, $modPW, $URL, $SALT ) {
@@ 201-206 (lines=6) @@
198
    } else if($xml && $xml->returncode == 'SUCCESS'){ //If there were meetings already created
199
        return array('returncode' => $xml->returncode, 'meetingID' => $xml->meetingID, 'moderatorPW' => $xml->moderatorPW, 'attendeePW' => $xml->attendeePW, 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, 'running' => $xml->running, 'recording' => $xml->recording, 'startTime' => $xml->startTime, 'endTime' => $xml->endTime, 'participantCount' => $xml->participantCount, 'moderatorCount' => $xml->moderatorCount, 'attendees' => $xml->attendees, 'metadata' => $xml->metadata );
200
201
    } else if( ($xml && $xml->returncode == 'FAILED') || $xml) { //If the xml packet returned failure it displays the message to the user
202
        return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey);
203
204
    } else { //If the server is unreachable, then prompts the user of the necessary action
205
        return null;
206
    }
207
}
208
209
function bigbluebuttonbn_getRecordingsArray( $meetingIDs, $URL, $SALT ) {