Skip to content

Commit

Permalink
fixed spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
rtobias81 committed Aug 16, 2017
1 parent 23e6588 commit e89461f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions CRM/Core/BAO/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,22 @@ class CRM_Core_BAO_Log extends CRM_Core_DAO_Log {
* @param string $table
*
* @return array|null
*
* This just has a couple of small changes suggested by Eileen to make this function fail more gracefully.
*/
public static function &lastModified($id, $table = 'civicrm_contact') {
public static function &lastModified($id, $table = 'civicrm_contact') {

$log = new CRM_Core_DAO_Log();

$log->entity_table = $table;
$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 e89461f

Please sign in to comment.