Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix "Anonymous Coward's Friends' Journals"

  • Loading branch information...
commit f4916a318f4025b644ce365b1ae1ed7615a68f5d 1 parent b3790b2
Chris Nandor pudge authored
5 plugins/FireHose/FireHose.pm
View
@@ -2531,10 +2531,7 @@ sub getAndSetOptions {
if ($fhfilter =~ /\{nickname\}/) {
if (!$opts->{user_view}) {
if ($form->{user_view_uid}) {
- $opts->{user_view} = $self->getUser($form->{user_view_id});
- if(!$opts->{user_view}) {
- $opts->{user_view} = $user;
- }
+ $opts->{user_view} = $self->getUser($form->{user_view_id}) || $user;
}
}
my $the_nickname = $opts->{user_view}{nickname};
4 plugins/FireHose/templates/list;firehose;default
View
@@ -47,8 +47,8 @@ __template__
[% IF user.uid == options.user_view_uid -%]
<a href="[% constants.real_rootdir %]/journal.pl?op=list">Manage Journal Entries</a> |
<a href="[% constants.real_rootdir %]/journal.pl?op=editprefs">Edit Journal Preferences</a> |
- [%- END %]
- <a href="[% constants.real_rootdir %]/~[% user.nickname | strip_paramattr %]/journal/friends">[% user.nickname | strip_literal %]'s Friends' Journals</a>
+ [%- END; this_user_nickname = Slash.db.getUser(options.user_view_uid, 'nickname') # options.user_view is not always there ... %]
+ <a href="[% constants.real_rootdir %]/~[% this_user_nickname | strip_paramattr %]/journal/friends">[% this_user_nickname | strip_literal %]'s Friends' Journals</a>
</div></div>
[% END %]
Please sign in to comment.
Something went wrong with that request. Please try again.