Permalink
Browse files

Added global varnish_version setting

  • Loading branch information...
1 parent 1361a29 commit 4a0e19a2054e7bff71ae59ef073e86a15b98064a = committed Aug 14, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 wp-varnish.php
View
@@ -345,7 +345,11 @@ function WPVarnishPurgeObject($wpv_url) {
$wpv_timeout = get_option($this->wpv_timeout_optname);
$wpv_use_adminport = get_option($this->wpv_use_adminport_optname);
- $wpv_vversion_optval = get_option($this->wpv_vversion_optname);
+ global $varnish_version;
+ if ( isset($varnish_version) && in_array($varnish_version, array(2,3)) )
+ $wpv_vversion_optval = $varnish_version;
+ else
+ $wpv_vversion_optval = get_option($this->wpv_vversion_optname);
$wpv_wpurl = get_bloginfo('url');
$wpv_replace_wpurl = '/^https?:\/\/([^\/]+)(.*)/i';

0 comments on commit 4a0e19a

Please sign in to comment.