all repos — wp-ffpc @ 381687b8bf81fc63dcf87708dec700259b9252aa

removed sync protocols; added server ip to HTML debug comment
Peter Molnar hello@petermolnar.eu
Fri, 28 Jun 2013 10:24:52 +0100
commit

381687b8bf81fc63dcf87708dec700259b9252aa

parent

50e13c227ee75cab220de9f72c719efcf6e1ec16

4 files changed, 2 insertions(+), 27 deletions(-)

jump to
M readme.txtreadme.txt

@@ -106,6 +106,7 @@

**Dropped functions** * there's no info log on/off anymore, it's triggered when WP_DEBUG is active +* sync protocols has been removed for two reasons: this has to be done by other systems and causes issues in special cases **For Devs**
M wp-ffpc-acache.phpwp-ffpc-acache.php

@@ -289,30 +289,13 @@ /* store pingback url if pingbacks are enabled */

if ( get_option ( 'default_ping_status' ) == 'open' ) $meta['pingback'] = get_bloginfo('pingback_url'); - /* sync all http and https requests if enabled */ - if ( isset( $config['sync_protocols'] ) && $config['sync_protocols'] == '1' ) { - if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' ) - $_SERVER['HTTPS'] = 'on'; - - if ( isset($_SERVER['HTTPS']) && ( ( strtolower($_SERVER['HTTPS']) == 'on' ) || ( $_SERVER['HTTPS'] == '1' ) ) ) { - $sync_from = 'http://' . $_SERVER['SERVER_NAME']; - $sync_to = 'https://' . $_SERVER['SERVER_NAME']; - } - else { - $sync_from = 'https://' . $_SERVER['SERVER_NAME']; - $sync_to = 'http://' . $_SERVER['SERVER_NAME']; - } - - $buffer = str_replace ( $sync_from, $sync_to, $buffer ); - } - /* add generation info is option is set, but only to HTML */ if ( $wp_ffpc_config['generate_time'] == '1' && stripos($buffer, '</body>') ) { global $wp_ffpc_gentime; $mtime = explode ( " ", microtime() ); $wp_ffpc_gentime = ( $mtime[1] + $mtime[0] )- $wp_ffpc_gentime; - $insertion = "\n<!-- \nWP-FFPC \n\tcache engine: ". $wp_ffpc_config['cache_type'] ."\n\tpage generation time: ". round( $wp_ffpc_gentime, 3 ) ." seconds\n\tgeneraton UNIX timestamp: ". time() . "\n\tgeneraton date: ". date( 'c' ) . "\n-->\n"; + $insertion = "\n<!-- \nWP-FFPC \n\tcache engine: ". $wp_ffpc_config['cache_type'] ."\n\tpage generation time: ". round( $wp_ffpc_gentime, 3 ) ." seconds\n\tgeneraton UNIX timestamp: ". time() . "\n\tgeneraton date: ". date( 'c' ) . "\n\tserver: ". $_SERVER['SERVER_ADDR'] . "\n-->\n"; $index = stripos( $buffer , '</body>' ); $buffer = substr_replace( $buffer, $insertion, $index, 0);
M wp-ffpc-class.phpwp-ffpc-class.php

@@ -533,14 +533,6 @@ <input type="checkbox" name="generate_time" id="generate_time" value="1" <?php checked($this->options['generate_time'],true); ?> />

<span class="description"><?php _e('Adds comment string including plugin name, cache engine and page generation time to every generated entry before closing <body> tag.', $this->plugin_constant); ?></span> </dd> - <dt> - <label for="sync_protocols"><?php _e("Enable sync protocols", $this->plugin_constant); ?></label> - </dt> - <dd> - <input type="checkbox" name="sync_protocols" id="sync_protocols" value="1" <?php checked($this->options['sync_protocols'],true); ?> /> - <span class="description"><?php _e('Enable to replace every protocol to the same as in the request for site\'s domain', $this->plugin_constant); ?></span> - </dd> - </dl> </fieldset>
M wp-ffpc.phpwp-ffpc.php

@@ -43,7 +43,6 @@ 'nocache_archive' => false,

'nocache_single' => false, 'nocache_page' => false, 'nocache_cookies' => false, - 'sync_protocols' => false, 'persistent' => false, 'response_header' => false, 'generate_time' => false,