projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #1382 from swati-karande/CRM-13146
[civicrm-core.git]
/
api
/
v3
/
MembershipType.php
diff --git
a/api/v3/MembershipType.php
b/api/v3/MembershipType.php
index 30f9e5f103785ca9a0aa59da89ef0eadd158d836..7e07cfb70d658ae118946b8ce5267a78abb780ee 100644
(file)
--- a/
api/v3/MembershipType.php
+++ b/
api/v3/MembershipType.php
@@
-1,5
+1,4
@@
<?php
<?php
-// $Id$
/*
+--------------------------------------------------------------------+
/*
+--------------------------------------------------------------------+
@@
-48,7
+47,6
@@
* {getfields MembershipType_get}
*/
function civicrm_api3_membership_type_create($params) {
* {getfields MembershipType_get}
*/
function civicrm_api3_membership_type_create($params) {
-
$values = $params;
civicrm_api3_verify_mandatory($values, 'CRM_Member_DAO_MembershipType');
$values = $params;
civicrm_api3_verify_mandatory($values, 'CRM_Member_DAO_MembershipType');
@@
-65,7
+63,7
@@
function civicrm_api3_membership_type_create($params) {
/**
* Adjust Metadata for Create action
/**
* Adjust Metadata for Create action
- *
+ *
* The metadata is used for setting defaults, documentation & validation
* @param array $params array or parameters determined by getfields
*/
* The metadata is used for setting defaults, documentation & validation
* @param array $params array or parameters determined by getfields
*/
@@
-91,7
+89,6
@@
function _civicrm_api3_membership_type_create_spec(&$params) {
* @access public
*/
function civicrm_api3_membership_type_get($params) {
* @access public
*/
function civicrm_api3_membership_type_get($params) {
-
return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
@@
-108,9
+105,6
@@
function civicrm_api3_membership_type_get($params) {
* {getfields MembershipType_delete}
*/
function civicrm_api3_membership_type_delete($params) {
* {getfields MembershipType_delete}
*/
function civicrm_api3_membership_type_delete($params) {
-
-
- $memberDelete = CRM_Member_BAO_MembershipType::del($params['id'], 1);
- return $memberDelete ? civicrm_api3_create_success($memberDelete) : civicrm_api3_create_error('Error while deleting membership type. id : ' . $params['id']);
+ return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
}