Changeset 113

Show
Ignore:
Timestamp:
01/14/06 19:50:13 (3 years ago)
Author:
ben
Message:

Fixes recent activity on friends weblog posts bug

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/_activity/index.php

    r106 r113  
    5858                $body .= "<h2>" . gettext("Activity on weblog posts you have marked as interesting") . "</h2>"; 
    5959                 
    60                 $activities = db_query("select users.username, users.name as weblogname, weblog_comments.*, weblog_posts.weblog, weblog_posts.ident as weblogpost, weblog_posts.title as weblogtitle, weblog_posts.weblog as weblog from weblog_watchlist left join weblog_comments on weblog_comments.post_id = weblog_watchlist.weblog_post left join weblog_posts on weblog_posts.ident = weblog_comments.post_id left join users on users.ident = weblog_posts.weblog where weblog_watchlist.owner = $page_owner and weblog_comments.posted >= $starttime order by weblog_comments.posted desc"); 
     60                $activities = db_query("select distinct users.username, users.name as weblogname, weblog_comments.*, weblog_posts.weblog, weblog_posts.ident as weblogpost, weblog_posts.title as weblogtitle, weblog_posts.weblog as weblog from weblog_watchlist left join weblog_comments on weblog_comments.post_id = weblog_watchlist.weblog_post left join weblog_posts on weblog_posts.ident = weblog_comments.post_id left join users on users.ident = weblog_posts.weblog where weblog_watchlist.owner = $page_owner and weblog_comments.posted >= $starttime order by weblog_comments.posted desc"); 
    6161                if (is_array($activities) && sizeof($activities) > 0) { 
    6262                        foreach($activities as $activity) { 
  • devel/units/weblogs/weblogs_actions.php

    r107 r113  
    164164                                                                // If we're logged on and not the owner of this comment, add this to our watchlist 
    165165                                                                if (logged_on && $owner != $post->owner) { 
     166                                                                        db_query("delete from weblog_watchlist where weblog_post = $post_id and owner = $owner"); 
    166167                                                                        db_query("insert into weblog_watchlist 
    167168                                                                                                set owner = $owner,