X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=Civi%2FCCase%2FEvents.php;h=557c8c08938160facecae9c338133978d96ec5b3;hb=0ba2104b919cafdd6694c38760ea728911ebcf58;hp=31b12caf14e082733ced59989510f6f330fb6d4e;hpb=39981e4d35e9e9b9ede5afb59a6db5c1e53c3ac8;p=civicrm-core.git diff --git a/Civi/CCase/Events.php b/Civi/CCase/Events.php index 31b12caf14..557c8c0893 100644 --- a/Civi/CCase/Events.php +++ b/Civi/CCase/Events.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 4.7 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2015 | + | Copyright CiviCRM LLC (c) 2004-2017 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -80,16 +80,20 @@ class Events { } /** - * @param $caseId + * Fire case change hook + * + * @param int|array $caseIds */ - public static function fireCaseChangeForRealz($caseId) { - if (!isset(self::$isActive[$caseId])) { - $tx = new \CRM_Core_Transaction(); - self::$isActive[$caseId] = 1; - $analyzer = new \Civi\CCase\Analyzer($caseId); - \CRM_Utils_Hook::caseChange($analyzer); - unset(self::$isActive[$caseId]); - unset($tx); + public static function fireCaseChangeForRealz($caseIds) { + foreach ((array) $caseIds as $caseId) { + if (!isset(self::$isActive[$caseId])) { + $tx = new \CRM_Core_Transaction(); + self::$isActive[$caseId] = 1; + $analyzer = new \Civi\CCase\Analyzer($caseId); + \CRM_Utils_Hook::caseChange($analyzer); + unset(self::$isActive[$caseId]); + unset($tx); + } } }