<?php
-// $Id$
/*
+--------------------------------------------------------------------+
*/
function civicrm_api3_relationship_delete($params) {
- require_once 'CRM/Utils/Rule.php';
if (!CRM_Utils_Rule::integer($params['id'])) {
return civicrm_api3_create_error('Invalid value for relationship ID');
}
foreach ($params as $key => $value) {
// ignore empty values or empty arrays etc
- require_once 'CRM/Utils/System.php';
if (CRM_Utils_System::isNull($value)) {
continue;
}
switch ($key) {
case 'contact_id_a':
case 'contact_id_b':
- require_once 'CRM/Utils/Rule.php';
if (!CRM_Utils_Rule::integer($value)) {
throw new Exception("contact_id not valid: $value");
}