all repos — wp-ffpc @ 1cd2d80e1e1ccc7810e08732679e7dde00a514e3

log message for domain mismatch
Peter Molnar hello@petermolnar.eu
Mon, 02 Feb 2015 12:10:15 +0000
commit

1cd2d80e1e1ccc7810e08732679e7dde00a514e3

parent

37d3e25cea0ee5ceb21c7403034f63a28d9fc6be

2 files changed, 11 insertions(+), 3 deletions(-)

jump to
M readme.txtreadme.txt

@@ -126,10 +126,11 @@ * every .B version indicates new features.

* every ..C indicates bugfixes for A.B version. = 1.7.9 = -*2015-01-30* +*2015-02-02* What's new: +* detailed log messages for other log message clarification * added auto-upgrade for advanced-cache.php on plugin upgrade
M wp-ffpc-class.phpwp-ffpc-class.php

@@ -113,10 +113,17 @@ }

} /* set global config key; here, because it's needed for migration */ - if ( $this->network ) + if ( $this->network ) { $this->global_config_key = 'network'; - else + } + else { + $sitedomain = parse_url( get_option('siteurl') , PHP_URL_HOST); + if ( $_SERVER['HTTP_HOST'] != $sitedomain ) { + $this->errors['domain_mismatch'] = sprintf( __("Domain mismatch: the site domain configuration (%s) does not match the HTTP_HOST (%s) variable in PHP. Please update the settings to match the two, otherwise the plugin may not work as expected.", $this->plugin_constant ), $sitedomain, $_SERVER['HTTP_HOST'] ); + } + $this->global_config_key = $_SERVER['HTTP_HOST']; + } /* cache type possible values array */ $this->select_cache_type = array (