X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=Civi%2FCCase%2FEvents.php;h=557c8c08938160facecae9c338133978d96ec5b3;hb=0ba2104b919cafdd6694c38760ea728911ebcf58;hp=8323c31d3e398f809fb59081500a1140915bde1a;hpb=ffae152baa52f9744ee875f8417d5e2650a9135e;p=civicrm-core.git diff --git a/Civi/CCase/Events.php b/Civi/CCase/Events.php index 8323c31d3e..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-2016 | + | 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); + } } }