You are here

function pagination_node_validate in Pagination (Node) 7

Implementation of hook_node_validate()

File

./pagination.module, line 215

Code

function pagination_node_validate($node, $form, &$form_state) {
  $pg = Pagination::instance();
  $style = $pg
    ->getStyle($node->type);
  $paging = $pg
    ->getValue($node->type);
  if ($paging > PAGINATION_AUTO and $style > PAGINATION_DEFAULT) {
    drupal_add_js(drupal_get_path('module', 'pagination') . '/js/pagination.js');
  }
}