Commit 1e0c8ccd4887c17f1ef5fa4cc2613e055686319a
1 parent
60b69b3c
Exists in
master
and in
29 other branches
Fixes crash in manage friends page when friend has own domain
When a profile has its own domain, Profile#url[:profile] is nil, which cause the links routed using Profile#url to break since they expected an profile value. I could find this problem in two places where it was assumed that the Profile#url hash has the profile value not nil. This patch adds profile in the url so the route matches. (ActionItem2385)
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
app/views/friends/index.rhtml
@@ -31,7 +31,7 @@ | @@ -31,7 +31,7 @@ | ||
31 | :class => 'button icon-remove', | 31 | :class => 'button icon-remove', |
32 | :title => _('remove') %> | 32 | :title => _('remove') %> |
33 | <%= link_to content_tag('span',_('contact')), | 33 | <%= link_to content_tag('span',_('contact')), |
34 | - friend.url.merge(:controller => 'contact', :action => 'new'), | 34 | + friend.url.merge(:controller => 'contact', :action => 'new', :profile => friend.identifier), |
35 | :class => 'button icon-menu-mail', | 35 | :class => 'button icon-menu-mail', |
36 | :title => _('contact') %> | 36 | :title => _('contact') %> |
37 | </div><!-- end class="controll" --> | 37 | </div><!-- end class="controll" --> |
app/views/search/communities.rhtml
@@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
4 | <% if logged_in? %> | 4 | <% if logged_in? %> |
5 | <% button_bar do %> | 5 | <% button_bar do %> |
6 | <%# FIXME shouldn't the user create the community in the current environment instead of going to its home environment? %> | 6 | <%# FIXME shouldn't the user create the community in the current environment instead of going to its home environment? %> |
7 | - <%= button(:add, __('New community'), user.url.merge(:controller => 'memberships', :action => 'new_community')) %> | 7 | + <%= button(:add, __('New community'), user.url.merge(:controller => 'memberships', :action => 'new_community', :profile => user.identifier)) %> |
8 | <% end %> | 8 | <% end %> |
9 | <% end %> | 9 | <% end %> |
10 | 10 |