You are here

function recently_read_block_save in Recently Read 7

Same name and namespace in other branches
  1. 7.2 recently_read.module \recently_read_block_save()

Implements hook_block_save().

File

./recently_read.module, line 83
Recently read module file. Displays a history of recently read nodes by currently logged in user.

Code

function recently_read_block_save($delta, $edit) {

  // save configuration settings
  $max_entries = variable_get('recently_read_max_entries', 10);
  $value = max(1, min($edit['items_count'], $max_entries));
  $max_count = variable_get('recently_read_max_length', array(
    'page' => 10,
    'article' => 10,
  ));
  $max_count[$delta] = $value;
  variable_set('recently_read_max_length', $max_count);
  return;
}