You are here

function popup_onload_update_7101 in Popup On Load 7

Implements hook_update_N().

1. Convert popup cookie lifetime value into seconds. 2. Add a variable with popup cookie name.

File

./popup_onload.install, line 119
Install, update, and uninstall functions for the Popup On Load module.

Code

function popup_onload_update_7101() {
  $popup_cookie_lifetime = variable_get(POPUP_ONLOAD_VAR_COOKIE_LIFETIME, 14);

  // Convert days to seconds.
  variable_set(POPUP_ONLOAD_VAR_COOKIE_LIFETIME, $popup_cookie_lifetime * 24 * 60 * 60);

  // Set default popup cookie name.
  variable_set(POPUP_ONLOAD_VAR_COOKIE_NAME, 'popup_onload_cookie_name');
}