X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FDashboard.php;h=4fa78a46e6f5428a166670aa4b0220470cc50682;hb=68e17471e52f45a5027b54a9f10504f965d7dfdb;hp=e38ead835360c060d43b127338c5bb6cef906574;hpb=c735fb7e38514eb6d7732ffb11ac21ac33e570b9;p=civicrm-core.git diff --git a/api/v3/Dashboard.php b/api/v3/Dashboard.php index e38ead8353..4fa78a46e6 100644 --- a/api/v3/Dashboard.php +++ b/api/v3/Dashboard.php @@ -65,12 +65,8 @@ function civicrm_api3_dashboard_get($params) { * Array holding 'id' of dashlet to be deleted. * @return array * @throws API_Exception + * @throws CiviCRM_API3_Exception */ function civicrm_api3_dashboard_delete($params) { - if (CRM_Core_BAO_Dashboard::deleteDashlet($params['id'])) { - return civicrm_api3_create_success(1, $params, 'Dashboard', 'delete'); - } - else { - throw new API_Exception('Could not delete dashlet'); - } + return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params); }