X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCase%2FAudit%2FAudit.php;h=1928fa4e4383cc5da7686e2a1a4a44ad64cd1a42;hb=a4aae59c25dd5823d17b107d3741925a343b0276;hp=37c4becffcf483620d529708ff5faddd81620ab6;hpb=ab2e3179d57fbd8b60c0730ec38b6cb678100a28;p=civicrm-core.git diff --git a/CRM/Case/Audit/Audit.php b/CRM/Case/Audit/Audit.php index 37c4becffc..1928fa4e43 100644 --- a/CRM/Case/Audit/Audit.php +++ b/CRM/Case/Audit/Audit.php @@ -49,11 +49,11 @@ class CRM_Case_Audit_Audit { $ifBlankReplacements = array(); - $completed = FALSE; + $completed = FALSE; $sortValues = array('1970-01-01'); - $category = ''; + $category = ''; $fieldindex = 1; - $fields = $activity->getElementsByTagName("Field"); + $fields = $activity->getElementsByTagName("Field"); foreach ($fields as $field) { $datatype_elements = $field->getElementsByTagName("Type"); $datatype = $datatype_elements->item(0)->nodeValue; @@ -99,7 +99,10 @@ class CRM_Case_Audit_Audit { //CRM-4570 if ($printReport) { if (!in_array($label, array( - 'Activity Type', 'Status'))) { + 'Activity Type', + 'Status', + )) + ) { $caseActivities[$activityindex][$fieldindex] = array(); $caseActivities[$activityindex][$fieldindex]['label'] = $label; $caseActivities[$activityindex][$fieldindex]['datatype'] = $datatype; @@ -182,7 +185,6 @@ class CRM_Case_Audit_Audit { * * This is intended to be called as a sort callback function, returning whether an activity's date is earlier or later than another's. * The type of date to use is specified in the config. - * */ /** @@ -199,7 +201,7 @@ class CRM_Case_Audit_Audit { } if ($aval < $bval) { - return - 1; + return -1; } elseif ($aval > $bval) { return 1; @@ -210,20 +212,19 @@ class CRM_Case_Audit_Audit { } /** - * @param $xmlString + * @param string $xmlString * @param int $clientID * @param int $caseID * @param bool $printReport * * @return mixed */ - static - function run($xmlString, $clientID, $caseID, $printReport = FALSE) { + public static function run($xmlString, $clientID, $caseID, $printReport = FALSE) { /* -$fh = fopen('C:/temp/audit2.xml', 'w'); -fwrite($fh, $xmlString); -fclose($fh); -*/ + $fh = fopen('C:/temp/audit2.xml', 'w'); + fwrite($fh, $xmlString); + fclose($fh); + */ $audit = new CRM_Case_Audit_Audit($xmlString, 'audit.conf.xml'); $activities = $audit->getActivities($printReport); @@ -241,4 +242,5 @@ fclose($fh); } return $contents; } + }