From 5a0e0a7ff8f29cc1ce75d2d2dfc54aead4c0265f Mon Sep 17 00:00:00 2001 From: Omar Hussein Date: Thu, 16 Sep 2021 15:51:09 +0100 Subject: [PATCH] Revert "BASW-123: Prevent cancelling membership when cancelling linked offline installment contribution" This reverts commit a3930931296ad0a31ba40011e8bb6d4a781ae34e. The reason is that we don't need this patch anymore since we will depend on disabling contributioncancelactions core extension instead. --- CRM/Core/DAO.php | 4 ---- CRM/Utils/Hook.php | 13 ------------- 2 files changed, 17 deletions(-) diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index 6e1d3c205c84..617c91f2a491 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -616,10 +616,6 @@ public function table() { */ public function save($hook = TRUE) { $eventID = uniqid(); - if ($hook) { - CRM_Utils_Hook::preSave($this); - } - if (!empty($this->id)) { if ($hook) { $preEvent = new \Civi\Core\DAO\Event\PreUpdate($this); diff --git a/CRM/Utils/Hook.php b/CRM/Utils/Hook.php index 46029ecaa198..82877f3feb08 100644 --- a/CRM/Utils/Hook.php +++ b/CRM/Utils/Hook.php @@ -1575,19 +1575,6 @@ public static function alterAPIPermissions($entity, $action, &$params, &$permiss ); } - /** - * @param CRM_Core_DAO $dao - * - * @return mixed - */ - public static function preSave(&$dao) { - $hookName = 'civicrm_preSave_' . $dao->getTableName(); - return self::singleton()->invoke(array('dao'), $dao, - self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, - $hookName - ); - } - /** * @param CRM_Core_DAO $dao *