[dw-free] similar interest search doesn't support communities
[commit: http://hg.dwscoalition.org/dw-free/rev/2ee7fedfe5d6]
http://bugs.dwscoalition.org/show_bug.cgi?id=3436
Allow you to find users with interests similar to $community_name.
Patch by
kareila.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=3436
Allow you to find users with interests similar to $community_name.
Patch by
Files modified:
- cgi-bin/DW/Controller/Search/Interests.pm
--------------------------------------------------------------------------------
diff -r 274654be3959 -r 2ee7fedfe5d6 cgi-bin/DW/Controller/Search/Interests.pm
--- a/cgi-bin/DW/Controller/Search/Interests.pm Fri Feb 04 11:34:24 2011 +0800
+++ b/cgi-bin/DW/Controller/Search/Interests.pm Fri Feb 04 12:28:21 2011 +0800
@@ -122,10 +122,11 @@ sub interest_handler {
unless $rv->{can_use_findsim};
my $u = LJ::load_user( $args->{user} )
or return error_ml( 'error.username_notfound' );
+ my $uitable = $u->is_comm ? 'comminterests' : 'userinterests';
my $dbr = LJ::get_db_reader();
my $sth = $dbr->prepare( "SELECT i.intid, i.intcount " .
- "FROM userinterests ui, interests i " .
+ "FROM $uitable ui, interests i " .
"WHERE ui.userid=? AND ui.intid=i.intid" );
$sth->execute( $u->userid );
--------------------------------------------------------------------------------
