Skip to content

Commit

Permalink
Properly attribute entries to authors in Selected object fields.
Browse files Browse the repository at this point in the history
  • Loading branch information
danwolfgang committed Mar 16, 2012
1 parent fa22c3c commit ca16a71
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -326,6 +326,10 @@ sub se_list_entries {
$app->user ? $app->user->preferred_language : undef); $app->user ? $app->user->preferred_language : undef);
$row->{created_on_relative} = relative_date($ts, time, $obj->blog); $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; return $row;
}, },
terms => \%terms, terms => \%terms,
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -350,6 +350,10 @@ sub se_list_content {
= relative_date( $ts, time, $obj->blog ); = relative_date( $ts, time, $obj->blog );
$row->{kind} = ucfirst( $obj->class ); $row->{kind} = ucfirst( $obj->class );
} }

my $author = MT->model('author')->load( $obj->author_id );
$row->{author_name} = $author ? $author->nickname : '';

return $row; return $row;
}, },
terms => \%terms, terms => \%terms,
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -331,6 +331,10 @@ sub se_list_pages {
$app->user ? $app->user->preferred_language : undef); $app->user ? $app->user->preferred_language : undef);
$row->{created_on_relative} = relative_date($ts, time, $obj->blog); $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; return $row;
}, },
terms => $terms, terms => $terms,
Expand Down

0 comments on commit ca16a71

Please sign in to comment.