CRM-13157 added static to the function and tested isDeleteRelatedMembership use case
authorDave Greenberg <dave@civicrm.org>
Mon, 5 Aug 2013 23:37:10 +0000 (16:37 -0700)
committerDave Greenberg <dave@civicrm.org>
Mon, 5 Aug 2013 23:37:10 +0000 (16:37 -0700)
----------------------------------------
* CRM-13157: isDeleteRelatedMembership() should be declared as static
  http://issues.civicrm.org/jira/browse/CRM-13157

CRM/Contact/BAO/Relationship.php

index 2ba8c638a74a08ba42e8c176a7612580adccfe11..0078f89eaca7c1ddb390e42f8360235a951257a4 100644 (file)
@@ -1338,8 +1338,10 @@ SELECT count(*)
    * Helper function to check whether to delete the membership or
    * not.
    *
+   * @static
+   *
    */
-  function isDeleteRelatedMembership($relTypeIds, $contactId, $mainRelatedContactId, $relTypeId, $relIds) {
+  static function isDeleteRelatedMembership($relTypeIds, $contactId, $mainRelatedContactId, $relTypeId, $relIds) {
     if (in_array($relTypeId, $relTypeIds)) {
       return TRUE;
     }