|
28 | 28 | import org.apache.wicket.markup.repeater.Item; |
29 | 29 | import org.apache.wicket.markup.repeater.data.DataView; |
30 | 30 | import org.apache.wicket.markup.repeater.data.ListDataProvider; |
| 31 | +import org.eclipse.jgit.lib.PersonIdent; |
31 | 32 |
|
32 | 33 | import com.gitblit.Constants; |
33 | 34 | import com.gitblit.GitBlit; |
|
42 | 43 | import com.gitblit.wicket.pages.SummaryPage; |
43 | 44 | import com.gitblit.wicket.pages.TagPage; |
44 | 45 | import com.gitblit.wicket.pages.TreePage; |
45 | | -import com.gitblit.wicket.pages.UserPage; |
46 | 46 |
|
47 | 47 | public class DigestsPanel extends BasePanel { |
48 | 48 |
|
@@ -111,17 +111,16 @@ public void populateItem(final Item<DailyLogEntry> logItem) { |
111 | 111 | } |
112 | 112 | logItem.add(changeIcon); |
113 | 113 |
|
114 | | - if (!isTag) { |
115 | | - logItem.add(new Label("whoChanged").setVisible(false)); |
116 | | - } else { |
117 | | - if (change.user.username.equals(change.user.emailAddress) && change.user.emailAddress.indexOf('@') > -1) { |
118 | | - // username is an email address can not link - 1.2.1 push log bug |
119 | | - logItem.add(new Label("whoChanged", change.user.getDisplayName())); |
| 114 | + if (isTag) { |
| 115 | + // tags are special |
| 116 | + PersonIdent ident = change.getCommits().get(0).getAuthorIdent(); |
| 117 | + if (!StringUtils.isEmpty(ident.getName())) { |
| 118 | + logItem.add(new Label("whoChanged", ident.getName())); |
120 | 119 | } else { |
121 | | - // link to user account page |
122 | | - logItem.add(new LinkPanel("whoChanged", null, change.user.getDisplayName(), |
123 | | - UserPage.class, WicketUtils.newUsernameParameter(change.user.username))); |
| 120 | + logItem.add(new Label("whoChanged", ident.getEmailAddress())); |
124 | 121 | } |
| 122 | + } else { |
| 123 | + logItem.add(new Label("whoChanged").setVisible(false)); |
125 | 124 | } |
126 | 125 |
|
127 | 126 | String preposition = "gb.of"; |
|
0 commit comments