Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Properly attribute entries to authors in Selected object fields.

  • Loading branch information...
commit ca16a71ab6fbcabbafc3c033b6220cb69fcb8bda 1 parent fa22c3c
@danwolfgang authored
View
4 plugins/MoreCustomFields/lib/MoreCustomFields/SelectedEntries.pm
@@ -326,6 +326,10 @@ sub se_list_entries {
$app->user ? $app->user->preferred_language : undef);
$row->{created_on_relative} = relative_date($ts, time, $obj->blog);
}
+
+ my $author = MT->model('author')->load( $obj->author_id );
+ $row->{author_name} = $author ? $author->nickname : '';
+
return $row;
},
terms => \%terms,
View
4 plugins/MoreCustomFields/lib/MoreCustomFields/SelectedEntriesOrPages.pm
@@ -350,6 +350,10 @@ sub se_list_content {
= relative_date( $ts, time, $obj->blog );
$row->{kind} = ucfirst( $obj->class );
}
+
+ my $author = MT->model('author')->load( $obj->author_id );
+ $row->{author_name} = $author ? $author->nickname : '';
+
return $row;
},
terms => \%terms,
View
4 plugins/MoreCustomFields/lib/MoreCustomFields/SelectedPages.pm
@@ -331,6 +331,10 @@ sub se_list_pages {
$app->user ? $app->user->preferred_language : undef);
$row->{created_on_relative} = relative_date($ts, time, $obj->blog);
}
+
+ my $author = MT->model('author')->load( $obj->author_id );
+ $row->{author_name} = $author ? $author->nickname : '';
+
return $row;
},
terms => $terms,
Please sign in to comment.
Something went wrong with that request. Please try again.