fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2012-01-10 11:47 am

[dw-free] Include username in community search

[commit: http://hg.dwscoalition.org/dw-free/rev/0df25880fd10]

http://bugs.dwscoalition.org/show_bug.cgi?id=1846

Fix "my $var = ... if ..." construction.

Patch by [personal profile] fu.

Files modified:
  • htdocs/search.bml
--------------------------------------------------------------------------------
diff -r a6c7c517436a -r 0df25880fd10 htdocs/search.bml
--- a/htdocs/search.bml	Tue Jan 10 19:35:31 2012 +0800
+++ b/htdocs/search.bml	Tue Jan 10 19:48:23 2012 +0800
@@ -164,7 +164,7 @@
     my $matches = '<br /><br />';
     foreach my $match ( @{ $result->{matches} } ) {
         my $mu = LJ::load_userid( $match->{journal_id} );
-        my $pu = LJ::load_userid( $match->{poster_id} ) if $mu->is_comm;
+        my $pu = $mu->is_comm ? LJ::load_userid( $match->{poster_id} ) : undef;
 
         # Do not show filtered icon for other users
         $match->{security} = 'access'
--------------------------------------------------------------------------------