Skip to content

Commit

Permalink
bug fix (#4659)
Browse files Browse the repository at this point in the history
  • Loading branch information
bradymiller committed Oct 3, 2021
1 parent 0d5f4b0 commit 5a99010
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 42 deletions.
10 changes: 10 additions & 0 deletions library/classes/Note.class.php
Expand Up @@ -100,6 +100,16 @@ public static function notes_factory($foreign_id = "")
return $notes;
}

public function getOwnerName()
{
if (!empty($this->owner)) {
$user_info = sqlQuery("SELECT `fname`, `lname` FROM `users` where `id`=?", [$this->owner]);
if (!empty($user_info)) {
return ($user_info['fname'] . " " . $user_info['lname']);
}
}
}

/**
* Convenience function to generate string debug data about the object
*/
Expand Down
41 changes: 0 additions & 41 deletions library/smarty/plugins/function.user_info.php

This file was deleted.

2 changes: 1 addition & 1 deletion templates/documents/general_view.html
Expand Up @@ -248,7 +248,7 @@ <h4>{$file->get_name()|text}
{xlt t='Date:'} {$note->get_date()|text}
{$note->get_note()|text}
{if $note->get_owner()}
&nbsp;-{user_info id=$note->get_owner()|text}
&nbsp;-{$note->getOwnerName()|text}
{/if}
</div>
{/foreach}
Expand Down

0 comments on commit 5a99010

Please sign in to comment.