You are here

function closeblock_closing_info_anonymous_set in Close Block 7

Same name and namespace in other branches
  1. 6 includes/closeblock.api.inc \closeblock_closing_info_anonymous_set()

Set info for anonymous users.

1 call to closeblock_closing_info_anonymous_set()
closeblock_closing_info_set in includes/closeblock.api.inc
Set info.

File

includes/closeblock.api.inc, line 175
Module settings functions.

Code

function closeblock_closing_info_anonymous_set($params) {
  if (!empty($params['theme']) && !empty($params['module']) && !empty($params['delta'])) {
    $block_id = theme('closeblock_block_id', $params);
    $count = 1;
    if (!empty($_SESSION['closeblock'][$block_id]['count'])) {
      $count += $_SESSION['closeblock'][$block_id]['count'];
    }
    $_SESSION['closeblock'][$block_id] = array(
      'count' => $count,
      'timestamp' => time(),
      'module' => $params['module'],
      'delta' => $params['delta'],
    );
  }
}