X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FPhone.php;h=00127310f849d85122b5df08f3331df596129ee9;hb=85bb0909cffd925f4cd5c0022a68a1ff74d3ad8e;hp=d32561080a0b6cab644c037c25d526c0f1dbea1c;hpb=14473d4b14dbe29fe2e59eb947fcb05191be0c19;p=civicrm-core.git diff --git a/api/v3/Phone.php b/api/v3/Phone.php index d32561080a..00127310f8 100644 --- a/api/v3/Phone.php +++ b/api/v3/Phone.php @@ -1,11 +1,10 @@ id = $phoneID; - if ($phoneDAO->find()) { - while ($phoneDAO->fetch()) { - $phoneDAO->delete(); - return civicrm_api3_create_success($phoneDAO->id, $params, $phoneDAO); - } - } - else { - return civicrm_api3_create_error('Could not delete phone with id ' . $phoneID); - } + return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params); } /**