Skip to content

Making the extension civicrm 4.6 compatible

rajeshs requested to merge github/fork/omarabuhussein/4.6-compatibility into master

Created by: omarabuhussein

Some changes to make the extension civicrm 4.6 compatible :

1- Replacing the call to :

CRM_Utils_System::setHttpHeader('Content-Type', 'application/json');

which only exist on civicrm 4.7 to :

 header("Content-Type: application/jsons");

2- Removing the <create_date> field from xml/CustomGroupData.xml since it was causing problems on installation and it is not an important field to be included anyway.

3- This is issue for both 4.7 and 4.6, inside CRM_Gdpr_Form_Forgetme class this propery is defined :

  /**
   * Contact ID.
   *
   * @var int
   */
  protected $_contactID = NULL;

but the class itself was using this instead :

$this->_contactId 

so I fixed that.

4- I also added implementation for both hook_civicrm_tabs and hook_civicrm_tabset hooks to ensure that the tab appear for both civicrm 4.7 and 4.6.

5- Contacts anonmization was not working on 4.6, the current code use is_core_field field which is only available on 4.7, so I've added a version check there and if civi 4.6 is used then it will use "where" field instead and ensure that the where field start with "civicrm_contact." since core fields usually start with that.

Merge request reports

Loading