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)
This commit is contained in:
Tristan Olive 2015-06-25 12:04:22 -04:00
parent 190c2e7436
commit 6dec366743
2 changed files with 3 additions and 4 deletions

View File

@ -612,7 +612,7 @@ default:
$action = bts(\'posted\'); $action = bts(\'posted\');
} }
$uid = $data->users_node_revisions_uid; $uid = $data->users_node_uid;
$account = user_load($uid); $account = user_load($uid);
echo l($account->boincuser_name, "account/{$uid}") . " {$action} " . l($data->node_title, $url, array(\'fragment\' => $fragment)); echo l($account->boincuser_name, "account/{$uid}") . " {$action} " . l($data->node_title, $url, array(\'fragment\' => $fragment));
?>', ?>',

View File

@ -1032,16 +1032,15 @@ function boincuser_views_pre_execute(&$view) {
$view->build_info['query']= " $view->build_info['query']= "
SELECT node_revisions.vid AS vid, SELECT node_revisions.vid AS vid,
node.nid AS node_nid, 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.type AS node_type,
node.title AS node_title, node.title AS node_title,
node_revisions.body AS node_revisions_body, node_revisions.body AS node_revisions_body,
node_revisions.timestamp AS node_revisions_timestamp node_revisions.timestamp AS node_revisions_timestamp
FROM node_revisions node_revisions 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 LEFT JOIN node node ON node_revisions.nid = node.nid
INNER JOIN users users ON node.uid = users.uid 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 UNION