[REF][PHP8.2] Remove need for _allowMultiClient property
authorBradley Taylor <hello@brad-taylor.co.uk>
Sat, 18 Nov 2023 16:51:11 +0000 (16:51 +0000)
committerBradley Taylor <hello@brad-taylor.co.uk>
Sat, 18 Nov 2023 16:51:11 +0000 (16:51 +0000)
CRM/Case/Form/Activity/OpenCase.php

index 1c3092f0bc19fb24ac6e0f8d937d75e5e1f7c6a3..6f01cce1b452b3b2b6d87965e83867a7ff70a4fe 100644 (file)
@@ -32,10 +32,6 @@ class CRM_Case_Form_Activity_OpenCase {
    * @throws \CRM_Core_Exception
    */
   public static function preProcess(&$form) {
-    //get multi client case configuration
-    $xmlProcessorProcess = new CRM_Case_XMLProcessor_Process();
-    $form->_allowMultiClient = (bool) $xmlProcessorProcess->getAllowMultipleCaseClients();
-
     if ($form->_context == 'caseActivity') {
       $contactID = CRM_Utils_Request::retrieve('cid', 'Positive', $form);
       $atype = CRM_Core_PseudoConstant::getKey('CRM_Activity_BAO_Activity', 'activity_type_id', 'Change Case Start Date');
@@ -140,9 +136,12 @@ class CRM_Case_Form_Activity_OpenCase {
       return;
     }
     if ($form->_context == 'standalone') {
+      //get multi client case configuration
+      $xmlProcessorProcess = new CRM_Case_XMLProcessor_Process();
+
       $form->addEntityRef('client_id', ts('Client'), [
         'create' => TRUE,
-        'multiple' => $form->_allowMultiClient,
+        'multiple' => (bool) $xmlProcessorProcess->getAllowMultipleCaseClients(),
       ], TRUE);
     }