You are here

function prev_next_enable in Previous/Next API 7.2

Same name and namespace in other branches
  1. 6 prev_next.install \prev_next_enable()
  2. 7 prev_next.install \prev_next_enable()

Implents hook_enable().

File

./prev_next.install, line 23
The (un)install and update code for the prev_next module.

Code

function prev_next_enable() {
  $max_nid = db_query('SELECT MAX(nid) FROM {node}')
    ->fetchField();
  variable_set('prev_next_index_nid', $max_nid);
  if ($max_nid) {
    drupal_set_message(t('Prev/Next will index from node %nid downward.', array(
      '%nid' => $max_nid,
    )));
  }
}