You are here

function googleanalytics_update_6401 in Google Analytics 6.4

Update list of default file extensions.

File

./googleanalytics.install, line 472
Installation file for Google Analytics module.

Code

function googleanalytics_update_6401() {
  $ret = array();
  if (variable_get('googleanalytics_trackfiles_extensions', '') == '7z|aac|arc|arj|asf|asx|avi|bin|csv|doc|exe|flv|gif|gz|gzip|hqx|jar|jpe?g|js|mp(2|3|4|e?g)|mov(ie)?|msi|msp|pdf|phps|png|ppt|qtm?|ra(m|r)?|sea|sit|tar|tgz|torrent|txt|wav|wma|wmv|wpd|xls|xml|z|zip') {
    variable_set('googleanalytics_trackfiles_extensions', '7z|aac|arc|arj|asf|asx|avi|bin|csv|doc(x|m)?|dot(x|m)?|exe|flv|gif|gz|gzip|hqx|jar|jpe?g|js|mp(2|3|4|e?g)|mov(ie)?|msi|msp|pdf|phps|png|ppt(x|m)?|pot(x|m)?|pps(x|m)?|ppam|sld(x|m)?|thmx|qtm?|ra(m|r)?|sea|sit|tar|tgz|torrent|txt|wav|wma|wmv|wpd|xls(x|m|b)?|xlt(x|m)|xlam|xml|z|zip');
    $ret[] = array(
      'success' => TRUE,
      'query' => 'The default extensions for download tracking have been updated.',
    );
  }
  else {
    $ret[] = array(
      'success' => TRUE,
      'query' => 'Custom extensions for download tracking setting found. Update skipped!',
    );
  }
  return $ret;
}