Skip to content

Commit

Permalink
v2.0.4: Cleaned up debugging logs
Browse files Browse the repository at this point in the history
  • Loading branch information
jfederico committed Feb 1, 2016
1 parent 5a7b5ee commit 0d964e4
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ function bigbluebuttonbn_getRecordingsURL( $URL, $SALT, $meetingID=null ) {
} else {
$params = "meetingID=".urlencode($meetingID);
}

error_log($base_url_record.$params."&checksum=".sha1("getRecordings".$params.$SALT));
return ($base_url_record.$params."&checksum=".sha1("getRecordings".$params.$SALT) );
}

Expand Down Expand Up @@ -316,36 +314,34 @@ function bigbluebuttonbn_doEndMeeting( $meetingID, $modPW, $URL, $SALT ) {
else { //If the server is unreachable, then prompts the user of the necessary action
return null;
}

}

function bigbluebuttonbn_isMeetingRunning( $meetingID, $URL, $SALT ) {
$xml = bigbluebuttonbn_wrap_xml_load_file( bigbluebuttonbn_getIsMeetingRunningURL( $meetingID, $URL, $SALT ) );

if( $xml && $xml->returncode == 'SUCCESS' )
if ( $xml && $xml->returncode == 'SUCCESS' ) {
return ( ( $xml->running == 'true' ) ? true : false);
else
} else {
return ( false );
}
}


function bigbluebuttonbn_getServerVersion( $URL ){
$base_url_record = $URL."api";

$xml = bigbluebuttonbn_wrap_xml_load_file( $base_url_record );
if( $xml && $xml->returncode == 'SUCCESS' )
$xml = bigbluebuttonbn_wrap_xml_load_file( $URL."api" );
if ( $xml && $xml->returncode == 'SUCCESS' ) {
return $xml->version;
else
} else {
return NULL;

}
}

function bigbluebuttonbn_getMeetingXML( $meetingID, $URL, $SALT ) {
$xml = bigbluebuttonbn_wrap_xml_load_file( bigbluebuttonbn_getIsMeetingRunningURL( $meetingID, $URL, $SALT ) );
if( $xml && $xml->returncode == 'SUCCESS')
if ( $xml && $xml->returncode == 'SUCCESS') {
return ( str_replace('</response>', '', str_replace("<?xml version=\"1.0\"?>\n<response>", '', $xml->asXML())));
else
} else {
return 'false';
}
}

function bigbluebuttonbn_wrap_xml_load_file($url, $method=BIGBLUEBUTTONBN_METHOD_GET, $data=null) {
Expand Down Expand Up @@ -374,14 +370,15 @@ function bigbluebuttonbn_wrap_xml_load_file($url, $method=BIGBLUEBUTTONBN_METHOD
$response = $c->get($url);
}

if($response) {
if ($response) {
$previous = libxml_use_internal_errors(true);
try {
$xml = new SimpleXMLElement($response, LIBXML_NOCDATA);
return $xml;
} catch (Exception $e){
libxml_use_internal_errors($previous);
error_log("The XML response is not correct on wrap_simplexml_load_file: ".$e->getMessage());
error_log("The XML response is not correct on wrap_simplexml_load_file");
error_log($response);
return NULL;
}
} else {
Expand Down

0 comments on commit 0d964e4

Please sign in to comment.