Merge branch 'master' of github.com:petermolnar/wp-ffpc into HEAD git-svn-id: http://plugins.svn.wordpress.org/wp-ffpc/trunk@703374 b8457f37-d9ea-0310-8a92-e5e31aec5664
cadeyrn cadeyrn@b8457f37-d9ea-0310-8a92-e5e31aec5664
Thu, 25 Apr 2013 09:40:01 +0000
5 files changed,
29 insertions(+),
19 deletions(-)
M
readme.txt
→
readme.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, fast Requires at least: 3.0 Tested up to: 3.5.1 -Stable tag: 1.1 +Stable tag: 1.1.1 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl-3.0.html@@ -85,8 +85,14 @@ 5. NGiNX example
== Changelog == += 1.1.1 = +*2013.04.25* + +* bugfix: Memcache plugin was diplaying server status incorrectly ( although the plugin was working ) +* bugfix: typo prevented log to work correctly + = 1.1 = -2013.04.24 +*2013.04.24* What's new:
M
wp-ffpc-abstract.php
→
wp-ffpc-abstract.php
@@ -361,7 +361,7 @@ */
abstract function plugin_hook_options_save ( $activating ); /** - * sends message to sysog + * sends message to syslog * * @param string $message message to add besides basic info * @param int $log_level [optional] Level of log, info by default@@ -372,22 +372,22 @@
if ( @is_array( $message ) || @is_object ( $message ) ) $message = serialize($message); - if (! $this->config['log'] ) + if ( !isset ( $this->options['log'] ) || $this->options['log'] != 1 ) return false; switch ( $log_level ) { case LOG_ERR : if ( function_exists( 'syslog' ) && function_exists ( 'openlog' ) ) { - openlog('wordpress('.$_SERVER['HTTP_HOST'].')',LOG_NDELAY|LOG_PID,LOG_SYSLOG); + openlog('wordpress('.$_SERVER['HTTP_HOST'].')',LOG_NDELAY|LOG_PERROR,LOG_SYSLOG); syslog( $log_level , self::plugin_constant . $message ); } /* error level is real problem, needs to be displayed on the admin panel */ - throw new Exception ( $message ); + //throw new Exception ( $message ); break; default: - if ( function_exists( 'syslog' ) && function_exists ( 'openlog' ) && $this->config['debug'] ) { - openlog('wordpress('.$_SERVER['HTTP_HOST'].')',LOG_NDELAY|LOG_PID,LOG_SYSLOG); - syslog( $log_level , self::plugin_constant . $message ); + if ( function_exists( 'syslog' ) && function_exists ( 'openlog' ) && isset( $this->options['log_info'] ) && $this->options['log_info'] == 1 ) { + openlog('wordpress(' .$_SERVER['HTTP_HOST']. ')', LOG_NDELAY,LOG_SYSLOG); + syslog( $log_level, self::plugin_constant . $message ); } break; }
M
wp-ffpc-backend.php
→
wp-ffpc-backend.php
@@ -62,7 +62,7 @@
/* call backend initiator based on cache type */ $init = $this->proxy( 'init' ); - $this->log ( __translate__(' init starting', self::plugin_constant )); + $this->log ( __translate__('init starting', self::plugin_constant )); $this->$init(); }@@ -376,24 +376,28 @@ *
* @param mixed $message message to add besides basic info * */ - public function log ( $message, $log_level = LOG_WARNING ) { + private function log ( $message, $log_level = LOG_WARNING ) { if ( @is_array( $message ) || @is_object ( $message ) ) $message = serialize($message); - if (! $this->options['log'] ) + if ( !isset ( $this->options['log'] ) || $this->options['log'] != 1 ) return false; switch ( $log_level ) { case LOG_ERR : - if ( function_exists( 'syslog' ) ) - syslog( $log_level , self::plugin_constant . " with " . $this->options['cache_type'] . ' ' . $message ); + if ( function_exists( 'syslog' ) && function_exists ( 'openlog' ) ) { + openlog('wordpress('.$_SERVER['HTTP_HOST'].')',LOG_NDELAY|LOG_PERROR,LOG_SYSLOG); + syslog( $log_level , self::plugin_constant . $message ); + } /* error level is real problem, needs to be displayed on the admin panel */ //throw new Exception ( $message ); break; default: - if ( function_exists( 'syslog' ) && isset($this->options['debug']) && $this->options['debug'] ) - syslog( $log_level , self::plugin_constant . " with " . $this->options['cache_type'] . ' ' . $message ); + if ( function_exists( 'syslog' ) && function_exists ( 'openlog' ) && isset( $this->options['log_info'] ) && $this->options['log_info'] == 1 ) { + openlog('wordpress(' .$_SERVER['HTTP_HOST']. ')', LOG_NDELAY,LOG_SYSLOG); + syslog( $log_level, self::plugin_constant . " " . $message ); + } break; }
M
wp-ffpc-class.php
→
wp-ffpc-class.php
@@ -326,7 +326,7 @@ echo $server_string ." => ";
if ( $status == 0 ) _e ( '<span class="error-msg">down</span><br />', $this->plugin_constant ); - elseif ( $status == 1 ) + elseif ( ( $this->options['cache_type'] == 'memcache' && $status > 0 ) || $status == 1 ) _e ( '<span class="ok-msg">up & running</span><br />', $this->plugin_constant ); else _e ( '<span class="error-msg">unknown, please try re-saving settings!</span><br />', $this->plugin_constant );
M
wp-ffpc.php
→
wp-ffpc.php
@@ -3,7 +3,7 @@ /*
Plugin Name: WP-FFPC Plugin URI: http://petermolnar.eu/wordpress/wp-ffpc Description: WordPress cache plugin for memcached & nginx - unbeatable speed -Version: 1.1 +Version: 1.1.1 Author: Peter Molnar <hello@petermolnar.eu> Author URI: http://petermolnar.eu/ License: GPLv3@@ -49,7 +49,7 @@ 'response_header' => false,
'generate_time' => false, ); -$wp_ffpc = new WP_FFPC ( 'wp-ffpc', '1.1', 'WP-FFPC', $wp_ffpc_defaults, 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XU3DG7LLA76WC' ); +$wp_ffpc = new WP_FFPC ( 'wp-ffpc', '1.1.1', 'WP-FFPC', $wp_ffpc_defaults, 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XU3DG7LLA76WC' ); ?>