Allow you to find users with interests similar to $community_name.

        Patch by kareila. 

diffs (16 lines):

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 );
 
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to