Skip to content

Commit

Permalink
Remove /[version] from Auto-Cache Engine User-Agent
Browse files Browse the repository at this point in the history
  • Loading branch information
raamdev committed Sep 23, 2014
1 parent 9239660 commit 0ede3e0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions quick-cache-pro/includes/version-specific-upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public function run_handlers()
$this->from_lt_v140104();
$this->from_lt_v140605();
$this->from_lt_v140612();
$this->from_lt_v140923();
}

/*
Expand Down Expand Up @@ -131,6 +132,20 @@ public function from_lt_v140612()
}
}
}

/*
* Upgrading from a version before we removed the WordPress version number from the Auto-Cache Engine User-Agent string.
*/
public function from_lt_v140923()
{
if(version_compare($this->prev_version, '140923', '<'))
{
$this->plugin->options['auto_cache_user_agent'] = $this->plugin->default_options['auto_cache_user_agent'];

update_option(__NAMESPACE__.'_options', $this->plugin->options);
if(is_multisite()) update_site_option(__NAMESPACE__.'_options', $this->plugin->options);
}
}
}
}
}
2 changes: 1 addition & 1 deletion quick-cache-pro/quick-cache-pro.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public function setup()
'auto_cache_delay' => '500', // In milliseconds.
'auto_cache_sitemap_url' => 'sitemap.xml', // Relative to `site_url()`.
'auto_cache_other_urls' => '', // A line-delimited list of any other URLs.
'auto_cache_user_agent' => 'WordPress/'.get_bloginfo('version'),
'auto_cache_user_agent' => 'WordPress',

'update_sync_username' => '', 'update_sync_password' => '',
'update_sync_version_check' => '1', 'last_update_sync_version_check' => '0'
Expand Down

0 comments on commit 0ede3e0

Please sign in to comment.