You are here

function fb_update_7403 in Drupal for Facebook 7.4

Set a default value for modules/fb using native JSON bigint decoding.

File

./fb.install, line 324

Code

function fb_update_7403() {
  if (defined(JSON_BIGINT_AS_STRING)) {
    $test = json_decode('[1000000000000]', TRUE, 512, JSON_BIGINT_AS_STRING);
  }
  if (!defined(JSON_BIGINT_AS_STRING) || !is_string($test[0])) {
    variable_set(FB_VAR_USE_JSON_BIGINT, FALSE);
  }

  // The FB_VAR_ALTER_USERNAME varaible name changed.  Preserve old setting.
  variable_set(FB_VAR_ALTER_USERNAME, variable_get('fb_format_username', FB_ALTER_USERNAME_ALWAYS));
}