Don't blow up when a service message's user is deleted

master^2
Mike Koch 6 years ago
parent 1ca4780d82
commit ba733a2619
No known key found for this signature in database
GPG Key ID: 9BA5D7F8391455ED

@ -367,6 +367,7 @@ echo mfh_get_hidden_fields_for_language(array(
'error_sorting_categories',
'error_retrieving_sm',
'all',
'e_udel',
));
echo '<script>var users = [];';

@ -44,7 +44,9 @@ function loadTable() {
$template.find('[data-property="id"]').attr('data-value', this.id);
$template.find('span[data-property="title"]').html(
getFormattedTitle(this.icon, this.title, this.style));
$template.find('span[data-property="author"]').text(users[this.createdBy].name);
var createdBy = users[this.createdBy] === undefined ? mfhLang.text('e_udel') : users[this.createdBy].name;
$template.find('span[data-property="author"]').text(createdBy);
if (this.published) {
$template.find('span[data-property="type"]').text(mfhLang.text('sm_published'));
} else {

Loading…
Cancel
Save