all repos — wp-ffpc @ 6f1900850990ddaf3a479e258190d1680653ca93

1.8.1
Peter Molnar hello@petermolnar.eu
Wed, 29 Apr 2015 09:57:40 +0100
commit

6f1900850990ddaf3a479e258190d1680653ca93

parent

525fc33839060789e4cde4c1053112ce5a5c7793

3 files changed, 25 insertions(+), 8 deletions(-)

jump to
M readme.txtreadme.txt

@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XU3DG7LLA76WC

Tags: cache, page cache, full page cache, nginx, memcached, apc, speed Requires at least: 3.0 Tested up to: 4.2.1 -Stable tag: 1.8.0 +Stable tag: 1.8.1 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl-3.0.html

@@ -124,6 +124,11 @@

* every A. indicates BIG changes. * every .B version indicates new features. * every ..C indicates bugfixes for A.B version. + += 1.8.1 = +*2015-04-29* + +* fixing the wrong release of 1.8.0 = 1.8.0 = *2015-04-29*
M wp-ffpc-backend.phpwp-ffpc-backend.php

@@ -1,8 +1,19 @@

<?php +/* __ only availabe if we're running from the inside of wordpress, not in advanced-cache.php phase */ +if ( !function_exists ('__translate__') ) { + /* __ only availabe if we're running from the inside of wordpress, not in advanced-cache.php phase */ + if ( function_exists ( '__' ) ) { + function __translate__ ( $text, $domain ) { return __($text, $domain); } + } + else { + function __translate__ ( $text, $domain ) { return $text; } + } +} + if (!class_exists('WP_FFPC_Backend')) : -include_once ( 'wp-common/plugin_utils.php'); +//include_once ( 'wp-common/plugin_utils.php'); /** * * @var string $plugin_constant Namespace of the plugin

@@ -27,7 +38,6 @@ private $options = array();

private $status = array(); public $cookies = array(); private $urimap = array(); - private $utilities; /** * constructor

@@ -50,17 +60,19 @@

/* these are the list of the cookies to look for when looking for logged in user */ $this->cookies = array ( 'comment_author_' , 'wordpressuser_' , 'wp-postpass_', 'wordpress_logged_in_' ); - /* make utilities singleton */ - $this->utilities = new PluginUtils(); - /* map the key with the predefined schemes */ $ruser = isset ( $_SERVER['REMOTE_USER'] ) ? $_SERVER['REMOTE_USER'] : ''; $ruri = isset ( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : ''; $rhost = isset ( $_SERVER['HTTP_HOST'] ) ? $_SERVER['HTTP_HOST'] : ''; $scookie = isset ( $_COOKIE['PHPSESSID'] ) ? $_COOKIE['PHPSESSID'] : ''; + if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' ) + $_SERVER['HTTPS'] = 'on'; + + $scheme = ( isset($_SERVER['HTTPS']) && (( strtolower($_SERVER['HTTPS']) == 'on' ) || ( $_SERVER['HTTPS'] == '1' ) )) ? 'https://' : 'http://'; + $this->urimap = array( - '$scheme' => str_replace ( '://', '', $this->utilities->replace_if_ssl ( 'http://' ) ), + '$scheme' => str_replace ( '://', '', $scheme ), '$host' => $rhost, '$request_uri' => $ruri, '$remote_user' => $ruser,
M wp-ffpc.phpwp-ffpc.php

@@ -3,7 +3,7 @@ /*

Plugin Name: WP-FFPC Plugin URI: https://github.com/petermolnar/wp-ffpc Description: WordPress in-memory full page cache plugin -Version: 1.8.0 +Version: 1.8.1 Author: Peter Molnar <hello@petermolnar.eu> Author URI: http://petermolnar.eu/ License: GPLv3