From 8d996d642e0df74779ae88091a0782937f59faea Mon Sep 17 00:00:00 2001 From: Emeka Mbah Date: Sun, 28 Feb 2016 04:44:29 +0100 Subject: [PATCH 1/7] Added an API for Personal Campaign Page --- api/v3/PCP.php | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 api/v3/PCP.php diff --git a/api/v3/PCP.php b/api/v3/PCP.php new file mode 100644 index 000000000000..512cf0b45344 --- /dev/null +++ b/api/v3/PCP.php @@ -0,0 +1,68 @@ + Date: Fri, 11 Mar 2016 09:46:14 +0100 Subject: [PATCH 2/7] Updated PCP.php Fixed the following warnings 1 - EndFileNewline 1 - LineEndings 3 - ScopeIndent --- api/v3/PCP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v3/PCP.php b/api/v3/PCP.php index 512cf0b45344..6e2c4fa4edcb 100644 --- a/api/v3/PCP.php +++ b/api/v3/PCP.php @@ -65,4 +65,4 @@ function civicrm_api3_p_c_p_get($params) { */ function civicrm_api3_p_c_p_delete($params) { return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params); -} \ No newline at end of file +} From 6fe339c84245935832edad5ff276a3e0d82eec67 Mon Sep 17 00:00:00 2001 From: Digitlimit Inc Date: Fri, 11 Mar 2016 10:30:29 +0100 Subject: [PATCH 3/7] Updated PCP.php Fixed four warnings --- api/v3/PCP.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/v3/PCP.php b/api/v3/PCP.php index 6e2c4fa4edcb..7445765a42af 100644 --- a/api/v3/PCP.php +++ b/api/v3/PCP.php @@ -40,7 +40,7 @@ * API result array */ function civicrm_api3_p_c_p_create($params) { - return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); + return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } /** @@ -52,7 +52,7 @@ function civicrm_api3_p_c_p_create($params) { * API result array */ function civicrm_api3_p_c_p_get($params) { - return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params); + return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params); } /** @@ -64,5 +64,5 @@ function civicrm_api3_p_c_p_get($params) { * API result array */ function civicrm_api3_p_c_p_delete($params) { - return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params); + return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params); } From 153710e3047d360dd7124cd015b6921d00b957e4 Mon Sep 17 00:00:00 2001 From: Digitlimit Inc Date: Thu, 21 Apr 2016 23:36:12 +0100 Subject: [PATCH 4/7] FIXME: CamelCase convention // FIXME: DAO names should follow CamelCase convention By changing this: if ($name == 'Im' || $name == 'Acl') { $name = strtoupper($name); } To: if ($name == 'Im' || $name == 'Acl' || $name == 'Pcp') { $name = strtoupper($name); } --- api/v3/utils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v3/utils.php b/api/v3/utils.php index 1d67d9120489..0e310b7dcad1 100644 --- a/api/v3/utils.php +++ b/api/v3/utils.php @@ -351,7 +351,7 @@ function _civicrm_api3_get_DAO($name) { return 'CRM_SMS_DAO_Provider'; } // FIXME: DAO names should follow CamelCase convention - if ($name == 'Im' || $name == 'Acl') { + if ($name == 'Im' || $name == 'Acl' || $name == 'Pcp') { $name = strtoupper($name); } $dao = CRM_Core_DAO_AllCoreTables::getFullName($name); From a9c93e59404c501b8446ba2a8051bf38a7503bc6 Mon Sep 17 00:00:00 2001 From: Digitlimit Inc Date: Thu, 21 Apr 2016 23:40:59 +0100 Subject: [PATCH 5/7] Changed Pcp naming convention Changed p_c_p to pcp which is the right naming convention --- api/v3/{PCP.php => Pcp.php} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename api/v3/{PCP.php => Pcp.php} (92%) diff --git a/api/v3/PCP.php b/api/v3/Pcp.php similarity index 92% rename from api/v3/PCP.php rename to api/v3/Pcp.php index 7445765a42af..7c444961f3c9 100644 --- a/api/v3/PCP.php +++ b/api/v3/Pcp.php @@ -39,7 +39,7 @@ * @return array * API result array */ -function civicrm_api3_p_c_p_create($params) { +function civicrm_api3_pcp_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } @@ -51,7 +51,7 @@ function civicrm_api3_p_c_p_create($params) { * @return array * API result array */ -function civicrm_api3_p_c_p_get($params) { +function civicrm_api3_pcp_get($params) { return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params); } @@ -63,6 +63,6 @@ function civicrm_api3_p_c_p_get($params) { * @return array * API result array */ -function civicrm_api3_p_c_p_delete($params) { +function civicrm_api3_pcp_delete($params) { return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params); } From ca58aba78433d8fbc69512546149ef89123bcb1b Mon Sep 17 00:00:00 2001 From: Digitlimit Inc Date: Fri, 6 May 2016 11:42:03 +0100 Subject: [PATCH 6/7] FIXME: CamelCase convention - Reverted // FIXME: DAO names should follow CamelCase convention //Reverted: if ($name == 'Im' || $name == 'Acl' || $name == 'Pcp') { $name = strtoupper($name); } To: if ($name == 'Im' || $name == 'Acl') { $name = strtoupper($name); } --- api/v3/utils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v3/utils.php b/api/v3/utils.php index 0e310b7dcad1..1d67d9120489 100644 --- a/api/v3/utils.php +++ b/api/v3/utils.php @@ -351,7 +351,7 @@ function _civicrm_api3_get_DAO($name) { return 'CRM_SMS_DAO_Provider'; } // FIXME: DAO names should follow CamelCase convention - if ($name == 'Im' || $name == 'Acl' || $name == 'Pcp') { + if ($name == 'Im' || $name == 'Acl') { $name = strtoupper($name); } $dao = CRM_Core_DAO_AllCoreTables::getFullName($name); From dd42539ab1ab23a24f71a991a00d2b180288168e Mon Sep 17 00:00:00 2001 From: Digitlimit Inc Date: Fri, 6 May 2016 11:45:55 +0100 Subject: [PATCH 7/7] Updated PCP.php - Reverted Reverted the naming convention form pcp to p_c_p due to tests failures --- api/v3/{Pcp.php => PCP.php} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename api/v3/{Pcp.php => PCP.php} (92%) diff --git a/api/v3/Pcp.php b/api/v3/PCP.php similarity index 92% rename from api/v3/Pcp.php rename to api/v3/PCP.php index 7c444961f3c9..7445765a42af 100644 --- a/api/v3/Pcp.php +++ b/api/v3/PCP.php @@ -39,7 +39,7 @@ * @return array * API result array */ -function civicrm_api3_pcp_create($params) { +function civicrm_api3_p_c_p_create($params) { return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params); } @@ -51,7 +51,7 @@ function civicrm_api3_pcp_create($params) { * @return array * API result array */ -function civicrm_api3_pcp_get($params) { +function civicrm_api3_p_c_p_get($params) { return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params); } @@ -63,6 +63,6 @@ function civicrm_api3_pcp_get($params) { * @return array * API result array */ -function civicrm_api3_pcp_delete($params) { +function civicrm_api3_p_c_p_delete($params) { return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params); }