HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

Activity: 'bookmarked discussion' is not bookmarked

yu_tangyu_tang New
edited March 2011 in Vanilla 2.0 - 2.8
I just noticed there are too many 'You commented on your bookmarked discussion.' activities in here.

http://vanillaforums.org/profile/activity

Yes, I commented but No, most of them are not bookmarked. I didn't.
Hard to elaborate but I feel that something's wrong.

Anybody else with the same problem?

Comments

  • yu_tangyu_tang New
    edited March 2011
    Ok, I could reproduce this on my local XAMPP.
    Vanilla 2.0.17.8.
    If I commented on someone (NOT ME!) bookmarked discussion,
    then I got 'You commented on your bookmarked discussion.' activity.

    See
    /applications/vanilla/models/class.commentmodel.php
    L612-.
             // Notify users who have bookmarked the discussion
    $BookmarkData = $DiscussionModel->GetBookmarkUsers($DiscussionID);
    foreach ($BookmarkData->Result() as $Bookmark) {
    if (!in_array($Bookmark->UserID, $NotifiedUsers) && $Bookmark->UserID != $Session->UserID) {
    $NotifiedUsers[] = $Bookmark->UserID;
    $ActivityModel = new ActivityModel();
    $ActivityID = $ActivityModel->Add(
    $Session->UserID, //<- Mom, It's Me?
    'BookmarkComment',
    I'm not sure but looks like it should be '$Bookmark->UserID'.
    @Mark, @Todd
Sign In or Register to comment.