r7204 - dumbhippo/trunk/server/src/com/dumbhippo/web/servlets
- From: commits mugshot org
- To: online-desktop-list gnome org
- Subject: r7204 - dumbhippo/trunk/server/src/com/dumbhippo/web/servlets
- Date: Mon, 14 Jan 2008 22:35:38 -0600 (CST)
Author: marinaz
Date: 2008-01-14 22:35:37 -0600 (Mon, 14 Jan 2008)
New Revision: 7204
Modified:
dumbhippo/trunk/server/src/com/dumbhippo/web/servlets/FacebookServlet.java
Log:
Use the right application name.
Only try to get the ExternalAccountType if the parameter is not "mugshot_tab".
Modified: dumbhippo/trunk/server/src/com/dumbhippo/web/servlets/FacebookServlet.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/web/servlets/FacebookServlet.java 2008-01-15 04:16:45 UTC (rev 7203)
+++ dumbhippo/trunk/server/src/com/dumbhippo/web/servlets/FacebookServlet.java 2008-01-15 04:35:37 UTC (rev 7204)
@@ -193,9 +193,12 @@
Map<ExternalAccountType, CharSequence> mugshotParams = mugshotParamsPair.getFirst();
String tabValue = mugshotParamsPair.getSecond().toString();
Boolean inviteSelected = tabValue.equalsIgnoreCase("invite");
+ String applicationName = "mugshot";
+ if (config.getBaseUrlMugshot().toExternalForm().contains("dogfood"))
+ applicationName = "mugshot-test";
xml.openElement("fb:tabs");
- xml.appendEmptyNode("fb:tab-item", "href", "http://apps.facebook.com/mugshot?mugshot_tab=home", "title", "Edit Accounts", "selected", Boolean.toString(!inviteSelected.booleanValue()));
- xml.appendEmptyNode("fb:tab-item", "href", "http://apps.facebook.com/mugshot?mugshot_tab=invite", "title", "Invite Friends", "selected", inviteSelected.toString());
+ xml.appendEmptyNode("fb:tab-item", "href", "http://apps.facebook.com/" + applicationName + "?mugshot_tab=home", "title", "Edit Accounts", "selected", Boolean.toString(!inviteSelected.booleanValue()));
+ xml.appendEmptyNode("fb:tab-item", "href", "http://apps.facebook.com/" + applicationName + "?mugshot_tab=invite", "title", "Invite Friends", "selected", inviteSelected.toString());
xml.closeElement();
if (inviteSelected.booleanValue()) {
FacebookTracker facebookTracker = WebEJBUtil.defaultLookup(FacebookTracker.class);
@@ -540,11 +543,13 @@
String key = entry.getKey().toString();
if (key.startsWith(mugshotParamPart)) {
String param = key.substring(mugshotParamPart.length());
- if (param.equals("tab"))
+ if (param.equals("tab")) {
tabValue = entry.getValue()[0];
- // we want to preserve the parameter even if entry.getValue()[0] is empty, because that might mean we want to
- // unset the external account information
- result.put(ExternalAccountType.valueOf(param), entry.getValue()[0]);
+ } else {
+ // we want to preserve the parameter even if entry.getValue()[0] is empty, because that might mean we want to
+ // unset the external account information
+ result.put(ExternalAccountType.valueOf(param), entry.getValue()[0]);
+ }
}
}
return new Pair<Map<ExternalAccountType, CharSequence>, CharSequence>(result, tabValue);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]