diff --git a/locallib.php b/locallib.php index d926710e4..91acdc596 100644 --- a/locallib.php +++ b/locallib.php @@ -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) ); } @@ -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('', '', str_replace("\n", '', $xml->asXML()))); - else + } else { return 'false'; + } } function bigbluebuttonbn_wrap_xml_load_file($url, $method=BIGBLUEBUTTONBN_METHOD_GET, $data=null) { @@ -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 {