You are here

function pagination_node_delete in Pagination (Node) 7

Implementation of hook_node_delete()

File

./pagination.module, line 174

Code

function pagination_node_delete($node) {
  $pg = Pagination::instance();
  $style = $pg
    ->getStyle($node->type);
  $paging = $pg
    ->getValue($node->type);
  if ($paging > PAGINATION_AUTO && $style > PAGINATION_DEFAULT) {
    db_delete('node_pagination')
      ->condition('nid', $node->nid, '=')
      ->execute();
  }
}