From 9a6cd1bd3fdd78eb6f9257784eba2bf79c4daa4d Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 18 May 2017 12:54:33 -0700 Subject: [PATCH 01/86] CRM-20541 - Use drupal_static() instead of static The impetus behind CRM-20541 seems to be a testing scenario where the setup/teardown process resets Civi (`Civi::reset()`) without resetting Drupal (`drupal_static_reset()`). IMHO, it's better to keep the systems aligned by either (a) resetting both or (b) resetting neither. For the situation where you reset both, the state within `civicrm_initialize()` needs some way to reset. This function executes within a Drupal context (before Civi has booted), so it should obey the reset conventions for Drupal -- i.e. use `drupal_static()`. --- civicrm.module | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/civicrm.module b/civicrm.module index 82f1af5..1d52b31 100644 --- a/civicrm.module +++ b/civicrm.module @@ -156,8 +156,8 @@ function civicrm_initialize() { } _civicrm_registerClassLoader(); - static $initialized = FALSE; - static $failure = FALSE; + $initialized = &drupal_static('civicrm_initialize', FALSE); + $failure = &drupal_static('civicrm_initialize_failure', FALSE); if ($failure) { return FALSE; @@ -687,7 +687,7 @@ function civicrm_user_form_validate($form, &$form_state) { // lets suppress key generation for all validation also civicrm_key_disable(); - static $validated = FALSE; + $validated = &drupal_static(__FUNCTION__, FALSE); if ($validated) { return; From 6e13de48f4042851b1673add88cf221a6a9421bd Mon Sep 17 00:00:00 2001 From: Klaas Eikelboom Date: Sun, 25 Jun 2017 13:40:56 -0400 Subject: [PATCH 02/86] CRM-19976: Fix for Drush: cannot disable civicrm debug --- drush/civicrm.drush.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drush/civicrm.drush.inc b/drush/civicrm.drush.inc index c9a73ca..5649303 100644 --- a/drush/civicrm.drush.inc +++ b/drush/civicrm.drush.inc @@ -155,6 +155,9 @@ function civicrm_drush_command() { $items['civicrm-enable-debug'] = array( 'description' => "Enable CiviCRM Debugging.", ); + $items['civicrm-disable-debug'] = array( + 'description' => "Disable CiviCRM Debugging.", + ); $items['civicrm-upgrade'] = array( 'description' => "Replace CiviCRM codebase with new specified tarfile and upgrade database by executing the CiviCRM upgrade process - civicrm/upgrade?reset=1.", 'examples' => From 36165b7326ff936fbf41e9c024b4140316afc86a Mon Sep 17 00:00:00 2001 From: yashodha Date: Thu, 6 Jul 2017 12:17:07 +0530 Subject: [PATCH 03/86] CRM-20822 - Expose tag parent id in views --- modules/views/components/civicrm.core.inc | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/modules/views/components/civicrm.core.inc b/modules/views/components/civicrm.core.inc index 30691de..3f60277 100644 --- a/modules/views/components/civicrm.core.inc +++ b/modules/views/components/civicrm.core.inc @@ -2967,6 +2967,30 @@ function _civicrm_core_data(&$data, $enabled) { 'sort' => array( 'handler' => 'views_handler_sort', ), + 'filter' => array( + 'handler' => 'views_handler_filter_string', + 'allow empty' => TRUE, + ), + ); + + $data['civicrm_tag']['parent_id'] = array( + 'title' => t('Tag Parent ID'), + 'help' => t('The numeric ID of the parent tag'), + 'field' => array( + 'handler' => 'views_handler_field_numeric', + 'click sortable' => TRUE, + ), + 'argument' => array( + 'handler' => 'views_handler_argument_numeric', + 'numeric' => TRUE, + ), + 'filter' => array( + 'handler' => 'views_handler_filter_numeric', + 'allow empty' => TRUE, + ), + 'sort' => array( + 'handler' => 'views_handler_sort', + ), ); /* From 9b18bdd1122df09d6259c64205e67f44d98da2f8 Mon Sep 17 00:00:00 2001 From: yashodha Date: Thu, 6 Jul 2017 12:24:10 +0530 Subject: [PATCH 04/86] CRM-20822 - Expose tag parent name in views --- modules/views/components/civicrm.core.inc | 25 +++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/modules/views/components/civicrm.core.inc b/modules/views/components/civicrm.core.inc index 3f60277..2abf069 100644 --- a/modules/views/components/civicrm.core.inc +++ b/modules/views/components/civicrm.core.inc @@ -2993,6 +2993,31 @@ function _civicrm_core_data(&$data, $enabled) { ), ); + $data['civicrm_tag']['parent_name'] = array( + 'title' => t('Parent Name'), + 'help' => t('Name of Parent Tag'), + 'real field' => 'parent_id', + 'field' => array( + 'handler' => 'civicrm_handler_field_pseudo_constant', + 'click sortable' => TRUE, + 'pseudo class' => 'CRM_Core_PseudoConstant', + 'pseudo method' => 'get', + 'pseudo args' => array('CRM_Core_BAO_EntityTag', 'tag_id'), + ), + 'argument' => array( + 'handler' => 'views_handler_argument', + ), + 'filter' => array( + 'handler' => 'civicrm_handler_filter_pseudo_constant', + 'pseudo class' => 'CRM_Core_PseudoConstant', + 'pseudo method' => 'get', + 'pseudo args' => array('CRM_Core_BAO_EntityTag', 'tag_id'), + ), + 'sort' => array( + 'handler' => 'views_handler_sort', + ), + ); + /* * UF Match table - expose drupal ID */ From 9e532d559caa3daa0d4032acb7b0faba291f4132 Mon Sep 17 00:00:00 2001 From: Deepak Srivastava Date: Thu, 13 Jul 2017 16:23:53 +0100 Subject: [PATCH 05/86] CRM-20153 show event pages for pcp --- .../views/components/civicrm.contribute.inc | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/modules/views/components/civicrm.contribute.inc b/modules/views/components/civicrm.contribute.inc index e1ecf39..27e498f 100644 --- a/modules/views/components/civicrm.contribute.inc +++ b/modules/views/components/civicrm.contribute.inc @@ -1347,7 +1347,7 @@ function _civicrm_contribute_data(&$data, $enabled) { // contribution page $data['civicrm_pcp']['contribution_page'] = array( - 'title' => t('Associated Contribution or Event Page'), + 'title' => t('Associated Contribution Page'), 'real field' => 'page_id', 'help' => t('The Contribution or Event Page with which this Personal Campaign Page is associated.'), 'field' => array( @@ -1371,6 +1371,34 @@ function _civicrm_contribute_data(&$data, $enabled) { ), ); + // event page + $data['civicrm_pcp']['event_page'] = array( + 'title' => t('Associated Event Page'), + 'real field' => 'page_id', + 'help' => t('The Event or Event Page with which this Personal Campaign Page is associated.'), + 'field' => array( + 'handler' => 'civicrm_handler_field_pseudo_constant', + 'click sortable' => TRUE, + 'pseudo class' => 'CRM_Event_PseudoConstant', + 'pseudo method' => 'event', + 'pseudo args' => array(NULL, FALSE, 'is_template = 0'), + ), + 'argument' => array( + 'handler' => 'views_handler_argument', + 'numeric' => TRUE, + ), + 'filter' => array( + 'handler' => 'civicrm_handler_filter_pseudo_constant', + 'allow empty' => TRUE, + 'pseudo class' => 'CRM_Event_PseudoConstant', + 'pseudo method' => 'event', + 'pseudo args' => array(NULL, FALSE, 'is_template = 0'), + ), + 'sort' => array( + 'handler' => 'views_handler_sort', + ), + ); + //BOOLEAN : IS Thermometer $data['civicrm_pcp']['is_thermometer'] = array( 'title' => t('Is Thermometer'), From cbeb2aca4391656becd44291f0d689c0defe5a8a Mon Sep 17 00:00:00 2001 From: Jamie McClelland Date: Fri, 21 Jul 2017 12:42:36 -0400 Subject: [PATCH 06/86] CRM-20937 - update to most recent templates used in core. --- .../CRM/Contact/Form/Edit/Demographics.tpl | 21 ++++++++++--------- .../CRM/Contact/Form/Inline/Demographics.tpl | 9 ++++---- .../CRM/Contact/Page/Inline/Demographics.tpl | 20 +++++++----------- 3 files changed, 22 insertions(+), 28 deletions(-) diff --git a/modules/civicrm_engage/templates/CRM/Contact/Form/Edit/Demographics.tpl b/modules/civicrm_engage/templates/CRM/Contact/Form/Edit/Demographics.tpl index ab14a0d..d8f5898 100644 --- a/modules/civicrm_engage/templates/CRM/Contact/Form/Edit/Demographics.tpl +++ b/modules/civicrm_engage/templates/CRM/Contact/Form/Edit/Demographics.tpl @@ -25,27 +25,27 @@ *}