Fix delete room bbb plugin see BT#9991

1.9.x
Julio Montoya 11 years ago
parent fb7aa5cef7
commit f27aae1e72
  1. 25
      plugin/bbb/lib/bbb.lib.php

@ -496,7 +496,7 @@ class bbb
),
api_get_self().'?'.
api_get_cidreq().
'&action=delete_record&id='.$record['recordId']
'&action=delete_record&id='.$meetingDB['id']
);
if ($meetingDB['visibility'] == 0) {
$actionLinks .= Display::url(
@ -728,10 +728,17 @@ class bbb
*/
public function deleteRecord($id)
{
if (empty($id) or $id != intval($id)) {
if (empty($id)) {
return false;
}
$meetingData = Database::select('*', $this->table, array('where' => array('id = ?' => array($id))), 'first');
$meetingData = Database::select(
'*',
$this->table,
array('where' => array('id = ?' => array($id))),
'first'
);
$recordingParams = array(
/*
* NOTE: Set the recordId below to a valid id after you have
@ -743,7 +750,17 @@ class bbb
// REQUIRED - We have to know which recording:
'recordId' => $meetingData['remote_id'],
);
return $this->api->deleteRecordingsWithXmlResponseArray($recordingParams);
$result = $this->api->deleteRecordingsWithXmlResponseArray($recordingParams);
if (!empty($result) && isset($result['deleted']) && $result['deleted'] == 'true') {
Database::delete(
$this->table,
array('id = ?' => array($id))
);
}
return $result;
}
/**

Loading…
Cancel
Save