all repos — wp-ffpc @ a853c5f0cb68fbb9d98752301e14cddd546d87bb

prefix lost during key scheme changes... no wonder cache was not working
Peter Molnar hello@petermolnar.eu
Tue, 25 Jun 2013 16:23:40 +0000
commit

a853c5f0cb68fbb9d98752301e14cddd546d87bb

parent

5b5bf7fbdcedccff98d93183557b6eeb03fa76b8

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

jump to
M wp-ffpc-acache.phpwp-ffpc-acache.php

@@ -243,12 +243,14 @@ $meta['type'] = 'page';

else $meta['type'] = 'unknown'; - /* check if caching is disabled for page type */ - $nocache_key = 'nocache_'. $meta['type']; + if ( $meta['type'] != 'unknown' ) { + /* check if caching is disabled for page type */ + $nocache_key = 'nocache_'. $meta['type']; - /* don't cache if prevented by rule */ - if ( $wp_ffpc_config[ $nocache_key ] == 1 ) { - return $buffer; + /* don't cache if prevented by rule */ + if ( $wp_ffpc_config[ $nocache_key ] == 1 ) { + return $buffer; + } } if ( is_404() )
M wp-ffpc-backend.phpwp-ffpc-backend.php

@@ -115,7 +115,7 @@ *

*/ public function key ( &$prefix ) { /* data is string only with content, meta is not used in nginx */ - $key = str_replace ( array_keys( $this->urimap ), $this->urimap, $this->options['key'] ); + $key = $prefix . str_replace ( array_keys( $this->urimap ), $this->urimap, $this->options['key'] ); $this->log ( __translate__('original key configuration: ', $this->plugin_constant ) . $this->options['key'] ); $this->log ( __translate__('setting key to: ', $this->plugin_constant ) . $key );

@@ -782,4 +782,4 @@ }

} -?>+?>
M wp-ffpc-class.phpwp-ffpc-class.php

@@ -1121,8 +1121,8 @@ $permalink = get_post_permalink( $post->ID );

break; } + /* in case the bloglinks are relative links add the base url, site specific */ $baseurl = get_blog_option ( $site, 'siteurl' ); - if ( !strstr( $permalink, $baseurl ) ) { $permalink = $baseurl . $permalink; }

@@ -1144,31 +1144,7 @@ }

} /** - * [TODO] this function will be used with error coded log messages - * display predefined message based on code - * - * - private function message ( $code, $type, $echo = true ) { - switch ( $type ) { - case 'notice': - $a = $this->notices; - break; - case 'warning': - $a = $this->warnings; - break; - default: - $a = $this->errors; - break; - } - - $r = isset ( $a[ $code ] ) ? $a[ $code ] : ''; - - if ( $echo ) echo $r; - else return $r; - }*/ - - /** - * print errors + * print errors, called by global errors hook * */ public function display_errors ( ) {