log message for domain mismatch
Peter Molnar hello@petermolnar.eu
Mon, 02 Feb 2015 12:10:15 +0000
2 files changed,
11 insertions(+),
3 deletions(-)
M
readme.txt
→
readme.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.php
→
wp-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 (