From 6dec366743c7c921b6488191ece18df0eb199383 Mon Sep 17 00:00:00 2001 From: Tristan Olive Date: Thu, 25 Jun 2015 12:04:22 -0400 Subject: [PATCH] Changed user_activity feed to look at the node table for uid, not node_revisions; if a moderator closes a forum topic, the revision is owned by the moderator, which disconnected the original author of the post with respect to the user activity feed (DBOINCP-198) --- .../features/user_profiles/user_profiles.views_default.inc | 2 +- .../sites/default/boinc/modules/boincuser/boincuser.module | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drupal/sites/all/features/user_profiles/user_profiles.views_default.inc b/drupal/sites/all/features/user_profiles/user_profiles.views_default.inc index ff766b7d69..db5c63adef 100644 --- a/drupal/sites/all/features/user_profiles/user_profiles.views_default.inc +++ b/drupal/sites/all/features/user_profiles/user_profiles.views_default.inc @@ -612,7 +612,7 @@ default: $action = bts(\'posted\'); } -$uid = $data->users_node_revisions_uid; +$uid = $data->users_node_uid; $account = user_load($uid); echo l($account->boincuser_name, "account/{$uid}") . " {$action} " . l($data->node_title, $url, array(\'fragment\' => $fragment)); ?>', diff --git a/drupal/sites/default/boinc/modules/boincuser/boincuser.module b/drupal/sites/default/boinc/modules/boincuser/boincuser.module index a918f46d02..df0a0d6411 100644 --- a/drupal/sites/default/boinc/modules/boincuser/boincuser.module +++ b/drupal/sites/default/boinc/modules/boincuser/boincuser.module @@ -1032,16 +1032,15 @@ function boincuser_views_pre_execute(&$view) { $view->build_info['query']= " SELECT node_revisions.vid AS vid, node.nid AS node_nid, - users_node_revisions.uid AS users_node_revisions_uid, + node.uid AS users_node_uid, node.type AS node_type, node.title AS node_title, node_revisions.body AS node_revisions_body, node_revisions.timestamp AS node_revisions_timestamp FROM node_revisions node_revisions - INNER JOIN users users_node_revisions ON node_revisions.uid = users_node_revisions.uid LEFT JOIN node node ON node_revisions.nid = node.nid INNER JOIN users users ON node.uid = users.uid - WHERE (node.type in ('forum', 'news', 'page', 'story')) AND (node.status = 1) AND (users_node_revisions.uid = {$account_id} ) + WHERE (node.type in ('forum', 'news', 'page', 'story')) AND (node.status = 1) AND (node.uid = {$account_id} ) UNION