Skip to content
Snippets Groups Projects
Commit 7ca2cbb4 authored by Kevin Cristiano's avatar Kevin Cristiano :earth_americas:
Browse files

CiviCRM-WordPress 4.7.2 changes

parent faeb3f05
No related branches found
No related tags found
No related merge requests found
Showing
with 11 additions and 10 deletions
......@@ -34,12 +34,11 @@ Dmitry Smirnov
Elin Waring
Emphanos LLC - Allen Shaw
Esantanche
Freeform Solutions - Lola Slade, Stephanie Gray
Freeform Solutions - Lola Slade, Stephanie Gray, Herb van den Dool
Future First - David Knoll, John Prescott
Fuzion NZ - Chris Burgess, Eileen McNaughton, Peter Davis, Torrance Hodgeson
Fuzion NZ - Chris Burgess, Eileen McNaughton, Peter Davis, Torrance Hodgson
Giant Rabbit - Peter Haight
Ginkgo Street Labs - Frank Gomez, Galata Tona, Michael Daryabeygi, Roshani Kothari, Toby Lounsbury
Herb
Jake Martin White
Joanne Chester
Joe McLaughlin
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -51,9 +51,8 @@ class CRM_Admin_Page_APIExplorer extends CRM_Core_Page {
$this->assign('operators', CRM_Core_DAO::acceptedSQLOperators());
// List example directories
global $civicrm_root;
$examples = array();
foreach (scandir(CRM_Utils_file::addTrailingSlash($civicrm_root, '/') . 'api/v3/examples') as $item) {
foreach (scandir(\Civi::paths()->getPath('[civicrm.root]/api/v3/examples')) as $item) {
if ($item && strpos($item, '.') === FALSE) {
$examples[] = $item;
}
......@@ -77,11 +76,9 @@ class CRM_Admin_Page_APIExplorer extends CRM_Core_Page {
* AJAX callback to fetch examples.
*/
public static function getExampleFile() {
global $civicrm_root;
$basePath = CRM_Utils_file::addTrailingSlash($civicrm_root, '/');
if (!empty($_GET['entity']) && strpos($_GET['entity'], '.') === FALSE) {
$examples = array();
foreach (scandir($basePath . 'api/v3/examples/' . $_GET['entity']) as $item) {
foreach (scandir(\Civi::paths()->getPath("[civicrm.root]/api/v3/examples/{$_GET['entity']}")) as $item) {
$item = str_replace('.php', '', $item);
if ($item && strpos($item, '.') === FALSE) {
$examples[] = array('key' => $item, 'value' => $item);
......@@ -90,7 +87,7 @@ class CRM_Admin_Page_APIExplorer extends CRM_Core_Page {
CRM_Utils_JSON::output($examples);
}
if (!empty($_GET['file']) && strpos($_GET['file'], '.') === FALSE) {
$fileName = $basePath . 'api/v3/examples/' . $_GET['file'] . '.php';
$fileName = \Civi::paths()->getPath("[civicrm.root]/api/v3/examples/{$_GET['file']}.php");
if (file_exists($fileName)) {
echo file_get_contents($fileName);
}
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -482,7 +482,12 @@ class CRM_Campaign_Form_Petition_Signature extends CRM_Core_Form {
$transaction = new CRM_Core_Transaction();
$addToGroupID = isset($this->_addToGroupID) ? $this->_addToGroupID : NULL;
// CRM-17029 - get the add_to_group_id from the _contactProfileFields array.
// There's a much more elegant solution with
// array_values($this->_contactProfileFields)[0] but it's PHP 5.4+ only.
$slice = array_slice($this->_contactProfileFields, 0, 1);
$firstField = array_shift($slice);
$addToGroupID = isset($firstField['add_to_group_id']) ? $firstField['add_to_group_id'] : NULL;
$this->_contactId = CRM_Contact_BAO_Contact::createProfileContact($params, $this->_contactProfileFields,
$this->_contactId, $addToGroupID,
$this->_contactProfileId, $this->_ctype,
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment