Skip to content

Commit

Permalink
fixed spacing and indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rtobias81 committed Aug 16, 2017
1 parent 23e6588 commit 4c7ef0e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CRM/Core/BAO/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class CRM_Core_BAO_Log extends CRM_Core_DAO_Log {
* @param string $table
*
* @return array|null
*
*/
public static function &lastModified($id, $table = 'civicrm_contact') {

Expand All @@ -51,9 +52,11 @@ public static function &lastModified($id, $table = 'civicrm_contact') {
$log->entity_id = $id;
$log->orderBy('modified_date desc');
$log->limit(1);
$result = NULL;
$displayName = $result = $contactImage = NULL;
if ($log->find(TRUE)) {
list($displayName, $contactImage) = CRM_Contact_BAO_Contact::getDisplayAndImage($log->modified_id);
if ($log->modified_id) {
list($displayName, $contactImage) = CRM_Contact_BAO_Contact::getDisplayAndImage($log->modified_id);
}
$result = array(
'id' => $log->modified_id,
'name' => $displayName,
Expand Down

0 comments on commit 4c7ef0e

Please sign in to comment.