Skip to content
Snippets Groups Projects
Commit c719b1a5 authored by Angie Byron's avatar Angie Byron
Browse files

#950680 by ericduran, Dave Reid: Fixed Multiple notices from tracker after deleting a node

parent 5a3d5149
No related branches found
No related tags found
No related merge requests found
......@@ -181,7 +181,12 @@ function tracker_node_update($node, $arg = 0) {
* Implements hook_node_delete().
*/
function tracker_node_delete($node, $arg = 0) {
_tracker_remove($node->nid, $node->uid, $node->changed);
db_delete('tracker_node')
->condition('nid', $node->nid)
->execute();
db_delete('tracker_user')
->condition('nid', $node->nid)
->execute();
}
/**
......
......@@ -9,7 +9,7 @@ class TrackerTest extends DrupalWebTestCase {
public static function getInfo() {
return array(
'name' => 'Tracker',
'description' => 'Create nodes and check for their display in the tracker listings.',
'description' => 'Create and delete nodes and check for their display in the tracker listings.',
'group' => 'Tracker'
);
}
......@@ -44,6 +44,11 @@ class TrackerTest extends DrupalWebTestCase {
$this->assertNoText($unpublished->title, t('Unpublished node do not show up in the tracker listing.'));
$this->assertText($published->title, t('Published node show up in the tracker listing.'));
$this->assertLink(t('My recent content'), 0, t('User tab shows up on the global tracker page.'));
// Delete a node and ensure it no longer appears on the tracker.
node_delete($published->nid);
$this->drupalGet('tracker');
$this->assertNoText($published->title, t('Deleted node do not show up in the tracker listing.'));
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment