You are here

function _views_natural_sort_remove_node in Views Natural Sort 7

Same name and namespace in other branches
  1. 6 views_natural_sort.module \_views_natural_sort_remove_node()

Helper function for removing node data from our sort index.

Parameters

$node: A drupal node object containing at least a nid.

Return value

int The number of rows deleted.

1 call to _views_natural_sort_remove_node()
views_natural_sort_node_delete in ./views_natural_sort.module
Implementation of hook_node_delete().

File

./views_natural_sort.module, line 128
Provides a views filter that sorts titles by a more natural manner by ignoring articles like "The" and "A."

Code

function _views_natural_sort_remove_node($node) {
  return db_delete('views_natural_sort')
    ->condition('nid', $node->nid)
    ->execute();
}