From 579cdd4a691adbbe89f85ce679502cf5d1f045d0 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Wed, 28 Nov 2012 17:09:45 -0500
Subject: [PATCH] Fixed missing format call for certificate authentication logging

---
 src/com/gitblit/wicket/pages/GravatarProfilePage.java |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/com/gitblit/wicket/pages/GravatarProfilePage.java b/src/com/gitblit/wicket/pages/GravatarProfilePage.java
index 1d702a7..ee567d7 100644
--- a/src/com/gitblit/wicket/pages/GravatarProfilePage.java
+++ b/src/com/gitblit/wicket/pages/GravatarProfilePage.java
@@ -18,15 +18,13 @@
 import java.io.IOException;
 import java.text.MessageFormat;
 
-import org.apache.wicket.AttributeModifier;
 import org.apache.wicket.PageParameters;
 import org.apache.wicket.markup.html.basic.Label;
-import org.apache.wicket.markup.html.image.Image;
 import org.apache.wicket.markup.html.link.ExternalLink;
-import org.apache.wicket.model.Model;
 
 import com.gitblit.models.GravatarProfile;
 import com.gitblit.utils.ActivityUtils;
+import com.gitblit.wicket.ExternalImage;
 import com.gitblit.wicket.WicketUtils;
 
 /**
@@ -49,15 +47,17 @@
 				profile = ActivityUtils.getGravatarProfile(object);
 			}
 		} catch (IOException e) {
-			error(MessageFormat.format("Failed to find Gravatar profile for {0}", object), e, true);
+			error(MessageFormat.format(getString("gb.failedToFindGravatarProfile"), object), e, true);
 		}
-
+		
+		if (profile == null) {
+			error(MessageFormat.format(getString("gb.failedToFindGravatarProfile"), object), true);
+		}
 		add(new Label("displayName", profile.displayName));
 		add(new Label("username", profile.preferredUsername));
 		add(new Label("location", profile.currentLocation));
 		add(new Label("aboutMe", profile.aboutMe));
-		Image image = new Image("profileImage");
-		image.add(new AttributeModifier("src", true, new Model<String>(profile.thumbnailUrl + "?s=256&d=identicon")));
+		ExternalImage image = new ExternalImage("profileImage", profile.thumbnailUrl + "?s=256&d=identicon");
 		add(image);
 		add(new ExternalLink("profileLink", profile.profileUrl));
 	}

--
Gitblit v1.9.1