Plugin Directory

Changeset 1268264


Ignore:
Timestamp:
10/18/2015 05:34:57 PM (10 years ago)
Author:
cadeyrn
Message:

version 1.9.1, bugfix release

Location:
wp-ffpc
Files:
1 deleted
13 edited
12 copied

Legend:

Unmodified
Added
Removed
  • wp-ffpc/tags/1.9.1/backends/apc.php

    r1264760 r1268264  
    1111        /* verify apc functions exist, apc extension is loaded */
    1212        if ( ! function_exists( 'apc_cache_info' ) ) {
    13             $this->log (  __translate__('APC extension missing', $this->plugin_constant ) );
     13            $this->log (  __translate__('APC extension missing', 'wp-ffpc' ) );
    1414            return false;
    1515        }
     
    1717        /* verify apc is working */
    1818        if ( apc_cache_info("user",true) ) {
    19             $this->log (  __translate__('backend OK', $this->plugin_constant ) );
     19            $this->log (  __translate__('backend OK', 'wp-ffpc' ) );
    2020            $this->alive = true;
    2121        }
     
    8080        foreach ( $keys as $key => $dummy ) {
    8181            if ( ! apc_delete ( $key ) ) {
    82                 $this->log ( sprintf( __translate__( 'Failed to delete APC entry: %s', $this->plugin_constant ),  $key ), LOG_WARNING );
     82                $this->log ( sprintf( __translate__( 'Failed to delete APC entry: %s', 'wp-ffpc' ),  $key ), LOG_WARNING );
    8383                //throw new Exception ( __translate__('Deleting APC entry failed with key ', $this->plugin_constant ) . $key );
    8484            }
    8585            else {
    86                 $this->log ( sprintf( __translate__( 'APC entry delete: %s', $this->plugin_constant ),  $key ) );
     86                $this->log ( sprintf( __translate__( 'APC entry delete: %s', 'wp-ffpc' ),  $key ) );
    8787            }
    8888        }
  • wp-ffpc/tags/1.9.1/backends/apcu.php

    r1264760 r1268264  
    1111        /* verify apcu functions exist, apcu extension is loaded */
    1212        if ( ! function_exists( 'apcu_cache_info' ) ) {
    13             $this->log (  __translate__('APCu extension missing', $this->plugin_constant ) );
     13            $this->log (  __translate__('APCu extension missing', 'wp-ffpc' ) );
    1414            return false;
    1515        }
     
    1717        /* verify apcu is working */
    1818        if ( @apcu_cache_info("user") != false ) {
    19             $this->log (  __translate__('backend OK', $this->plugin_constant ) );
     19            $this->log (  __translate__('backend OK', 'wp-ffpc' ) );
    2020            $this->alive = true;
    2121        }
     
    8080        foreach ( $keys as $key => $dummy ) {
    8181            if ( ! apcu_delete ( $key ) ) {
    82                 $this->log ( sprintf( __translate__( 'Failed to delete APC entry: %s', $this->plugin_constant ),  $key ), LOG_WARNING );
    83                 //throw new Exception ( __translate__('Deleting APC entry failed with key ', $this->plugin_constant ) . $key );
     82                $this->log ( sprintf( __translate__( 'Failed to delete APC entry: %s', 'wp-ffpc' ),  $key ), LOG_WARNING );
     83                //throw new Exception ( __translate__('Deleting APC entry failed with key ', 'wp-ffpc' ) . $key );
    8484            }
    8585            else {
    86                 $this->log ( sprintf( __translate__( 'APC entry delete: %s', $this->plugin_constant ),  $key ) );
     86                $this->log ( sprintf( __translate__( 'APC entry delete: %s', 'wp-ffpc' ),  $key ) );
    8787            }
    8888        }
  • wp-ffpc/tags/1.9.1/backends/memcache.php

    r1264760 r1268264  
    1010        /* Memcached class does not exist, Memcache extension is not available */
    1111        if (!class_exists('Memcache')) {
    12             $this->log (  __translate__('PHP Memcache extension missing', $this->plugin_constant ), LOG_WARNING );
     12            $this->log (  __translate__('PHP Memcache extension missing', 'wp-ffpc' ), LOG_WARNING );
    1313            return false;
    1414        }
     
    1616        /* check for existing server list, otherwise we cannot add backends */
    1717        if ( empty ( $this->options['servers'] ) && ! $this->alive ) {
    18             $this->log (  __translate__("servers list is empty, init failed", $this->plugin_constant ), LOG_WARNING );
     18            $this->log (  __translate__("servers list is empty, init failed", 'wp-ffpc' ), LOG_WARNING );
    1919            return false;
    2020        }
     
    2626        /* check if initialization was success or not */
    2727        if ( $this->connection === NULL ) {
    28             $this->log (  __translate__( 'error initializing Memcache PHP extension, exiting', $this->plugin_constant ) );
     28            $this->log (  __translate__( 'error initializing Memcache PHP extension, exiting', 'wp-ffpc' ) );
    2929            return false;
    3030        }
     
    3838                $this->status[$server_id] = $this->connection->connect ( $server['host'] , $server['port'] );
    3939
    40             $this->log ( sprintf( __translate__( '%s added', $this->plugin_constant ),  $server_id ) );
     40            $this->log ( sprintf( __translate__( '%s added', 'wp-ffpc' ),  $server_id ) );
    4141        }
    4242
     
    5252    protected  function _status () {
    5353        /* server status will be calculated by getting server stats */
    54         $this->log (  __translate__("checking server statuses", $this->plugin_constant ));
     54        $this->log (  __translate__("checking server statuses", 'wp-ffpc' ));
    5555        /* get servers statistic from connection */
    5656        foreach ( $this->options['servers'] as $server_id => $server ) {
     
    6060                $this->status[$server_id] = $this->connection->getServerStatus( $server['host'], $server['port'] );
    6161            if ( $this->status[$server_id] == 0 )
    62                 $this->log ( sprintf( __translate__( '%s server is down', $this->plugin_constant ),  $server_id ) );
     62                $this->log ( sprintf( __translate__( '%s server is down', 'wp-ffpc' ),  $server_id ) );
    6363            else
    64                 $this->log ( sprintf( __translate__( '%s server is up & running', $this->plugin_constant ),  $server_id ) );
     64                $this->log ( sprintf( __translate__( '%s server is up & running', 'wp-ffpc' ),  $server_id ) );
    6565        }
    6666    }
     
    111111
    112112            if ( $kresult === false ) {
    113                 $this->log ( sprintf( __translate__( 'unable to delete entry: %s', $this->plugin_constant ),  $key ) );
     113                $this->log ( sprintf( __translate__( 'unable to delete entry: %s', 'wp-ffpc' ),  $key ) );
    114114            }
    115115            else {
    116                 $this->log ( sprintf( __translate__( 'entry deleted: %s', $this->plugin_constant ),  $key ) );
     116                $this->log ( sprintf( __translate__( 'entry deleted: %s', 'wp-ffpc' ),  $key ) );
    117117            }
    118118        }
  • wp-ffpc/tags/1.9.1/backends/memcached.php

    r1264760 r1268264  
    88        /* Memcached class does not exist, Memcached extension is not available */
    99        if (!class_exists('Memcached')) {
    10             $this->log (  __translate__(' Memcached extension missing, wp-ffpc will not be able to function correctly!', $this->plugin_constant ), LOG_WARNING );
     10            $this->log (  __translate__(' Memcached extension missing, wp-ffpc will not be able to function correctly!', 'wp-ffpc' ), LOG_WARNING );
    1111            return false;
    1212        }
     
    1414        /* check for existing server list, otherwise we cannot add backends */
    1515        if ( empty ( $this->options['servers'] ) && ! $this->alive ) {
    16             $this->log (  __translate__("Memcached servers list is empty, init failed", $this->plugin_constant ), LOG_WARNING );
     16            $this->log (  __translate__("Memcached servers list is empty, init failed", 'wp-ffpc' ), LOG_WARNING );
    1717            return false;
    1818        }
     
    3535        /* check if initialization was success or not */
    3636        if ( $this->connection === NULL ) {
    37             $this->log (  __translate__( 'error initializing Memcached PHP extension, exiting', $this->plugin_constant ) );
     37            $this->log (  __translate__( 'error initializing Memcached PHP extension, exiting', 'wp-ffpc' ) );
    3838            return false;
    3939        }
     
    6060            if ( !@array_key_exists($server_id , $servers_alive ) ) {
    6161                $this->connection->addServer( $server['host'], $server['port'] );
    62                 $this->log ( sprintf( __translate__( '%s added', $this->plugin_constant ),  $server_id ) );
     62                $this->log ( sprintf( __translate__( '%s added', 'wp-ffpc' ),  $server_id ) );
    6363            }
    6464        }
     
    7575    protected function _status () {
    7676        /* server status will be calculated by getting server stats */
    77         $this->log (  __translate__("checking server statuses", $this->plugin_constant ));
     77        $this->log (  __translate__("checking server statuses", 'wp-ffpc' ));
    7878        /* get server list from connection */
    7979        $servers =  $this->connection->getServerList();
     
    8383            /* reset server status to offline */
    8484            $this->status[$server_id] = 0;
    85                 if ($this->connection->set($this->plugin_constant, time())) {
    86                     $this->log ( sprintf( __translate__( '%s server is up & running', $this->plugin_constant ),  $server_id ) );
     85                if ($this->connection->set('wp-ffpc', time())) {
     86                    $this->log ( sprintf( __translate__( '%s server is up & running', 'wp-ffpc' ),  $server_id ) );
    8787                $this->status[$server_id] = 1;
    8888            }
     
    114114        if ( $result === false ) {
    115115            $code = $this->connection->getResultCode();
    116             $this->log ( sprintf( __translate__( 'unable to set entry: %s', $this->plugin_constant ),  $key ) );
    117             $this->log ( sprintf( __translate__( 'Memcached error code: %s', $this->plugin_constant ),  $code ) );
    118             //throw new Exception ( __translate__('Unable to store Memcached entry ', $this->plugin_constant ) . $key . __translate__( ', error code: ', $this->plugin_constant ) . $code );
     116            $this->log ( sprintf( __translate__( 'unable to set entry: %s', 'wp-ffpc' ),  $key ) );
     117            $this->log ( sprintf( __translate__( 'Memcached error code: %s', 'wp-ffpc' ),  $code ) );
     118            //throw new Exception ( __translate__('Unable to store Memcached entry ', 'wp-ffpc' ) . $key . __translate__( ', error code: ', 'wp-ffpc' ) . $code );
    119119        }
    120120
     
    147147            if ( $kresult === false ) {
    148148                $code = $this->connection->getResultCode();
    149                 $this->log ( sprintf( __translate__( 'unable to delete entry: %s', $this->plugin_constant ),  $key ) );
    150                 $this->log ( sprintf( __translate__( 'Memcached error code: %s', $this->plugin_constant ),  $code ) );
     149                $this->log ( sprintf( __translate__( 'unable to delete entry: %s', 'wp-ffpc' ),  $key ) );
     150                $this->log ( sprintf( __translate__( 'Memcached error code: %s', 'wp-ffpc' ),  $code ) );
    151151            }
    152152            else {
    153                 $this->log ( sprintf( __translate__( 'entry deleted: %s', $this->plugin_constant ),  $key ) );
     153                $this->log ( sprintf( __translate__( 'entry deleted: %s', 'wp-ffpc' ),  $key ) );
    154154            }
    155155        }
  • wp-ffpc/tags/1.9.1/readme.txt

    r1266062 r1268264  
    55Requires at least: 3.0
    66Tested up to: 4.3.1
    7 Stable tag: 1.9.0
     7Stable tag: 1.9.1
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    129129* every ..C indicates bugfixes for A.B version.
    130130
     131= 1.9.1 =
     132*2015-10-18*
     133
     134* bugfix for is_writable check failures ( see: https://wordpress.org/support/topic/settings-saved-but-getting-not-saved-error-message)
     135* bugfix for memcached.protocol notice
     136* typo fixes
     137* replace variable with string constant in translatable messages
     138
    131139= 1.9.0 =
    132140*2015-10-14*
  • wp-ffpc/tags/1.9.1/wp-ffpc-abstract.php

    r1266062 r1268264  
    88    else {
    99        function __translate__ ( $text, $domain ) { return $text; }
     10    }
     11}
     12
     13if ( !function_exists ('__debug__') ) {
     14    /* __ only availabe if we're running from the inside of wordpress, not in advanced-cache.php phase */
     15    function __debug__ ( $text ) {
     16        if ( defined('WP_FFPC__DEBUG_MODE') && WP_FFPC__DEBUG_MODE == true)
     17            error_log ( __FILE__ . ': ' . $text );
    1018    }
    1119}
  • wp-ffpc/tags/1.9.1/wp-ffpc-backend.php

    r1266062 r1268264  
    2323    const port_separator  = ':';
    2424
    25     protected $plugin_constant = 'wp-ffpc';
    2625    protected $connection = NULL;
    2726    protected $alive = false;
     
    243242
    244243            /* proxy to internal function */
    245             $internal = $this->_flush();
     244            $result = $this->_flush();
    246245
    247246            if ( $result === false )
  • wp-ffpc/tags/1.9.1/wp-ffpc-class.php

    r1266062 r1268264  
    6868     */
    6969    public function plugin_post_construct () {
     70        static::debug ( __CLASS__, 'post_construct' );
    7071        $this->plugin_url = plugin_dir_url( __FILE__ );
    7172        $this->plugin_dir = plugin_dir_path( __FILE__ );
     
    7980     */
    8081    public function plugin_pre_init() {
     82        static::debug ( __CLASS__, 'pre_init' );
    8183        /* advanced cache "worker" file */
    8284        $this->acache_worker = $this->plugin_dir . $this->plugin_constant . '-acache.php';
     
    243245        if ( extension_loaded ( 'memcache' )  ) {
    244246            $memcache_settings = ini_get_all( 'memcache' );
    245             if ( !empty ( $memcache_settings ) && $this->options['cache_type'] == 'memcache' )
     247            if ( !empty ( $memcache_settings ) && $this->options['cache_type'] == 'memcache' && isset($memcache_settings['memcache.protocol']) )
    246248            {
    247249                $memcache_protocol = strtolower($memcache_settings['memcache.protocol']['local_value']);
     
    10011003    private function deploy_advanced_cache( ) {
    10021004
    1003         if ( !is_writable( $this->acache )) {
     1005        if (!touch($this->acache)) {
    10041006            error_log('Generating advanced-cache.php failed: '.$this->acache.' is not writable');
    10051007            return false;
     
    10111013            return false;
    10121014        }
     1015
    10131016
    10141017        /* add the required includes and generate the needed code */
  • wp-ffpc/tags/1.9.1/wp-ffpc.php

    r1266062 r1268264  
    44Plugin URI: https://github.com/petermolnar/wp-ffpc
    55Description: WordPress in-memory full page cache plugin
    6 Version: 1.9.0
     6Version: 1.9.1
    77Author: Peter Molnar <hello@petermolnar.eu>
    88Author URI: http://petermolnar.eu/
  • wp-ffpc/trunk/backends/apc.php

    r1264760 r1268264  
    1111        /* verify apc functions exist, apc extension is loaded */
    1212        if ( ! function_exists( 'apc_cache_info' ) ) {
    13             $this->log (  __translate__('APC extension missing', $this->plugin_constant ) );
     13            $this->log (  __translate__('APC extension missing', 'wp-ffpc' ) );
    1414            return false;
    1515        }
     
    1717        /* verify apc is working */
    1818        if ( apc_cache_info("user",true) ) {
    19             $this->log (  __translate__('backend OK', $this->plugin_constant ) );
     19            $this->log (  __translate__('backend OK', 'wp-ffpc' ) );
    2020            $this->alive = true;
    2121        }
     
    8080        foreach ( $keys as $key => $dummy ) {
    8181            if ( ! apc_delete ( $key ) ) {
    82                 $this->log ( sprintf( __translate__( 'Failed to delete APC entry: %s', $this->plugin_constant ),  $key ), LOG_WARNING );
     82                $this->log ( sprintf( __translate__( 'Failed to delete APC entry: %s', 'wp-ffpc' ),  $key ), LOG_WARNING );
    8383                //throw new Exception ( __translate__('Deleting APC entry failed with key ', $this->plugin_constant ) . $key );
    8484            }
    8585            else {
    86                 $this->log ( sprintf( __translate__( 'APC entry delete: %s', $this->plugin_constant ),  $key ) );
     86                $this->log ( sprintf( __translate__( 'APC entry delete: %s', 'wp-ffpc' ),  $key ) );
    8787            }
    8888        }
  • wp-ffpc/trunk/backends/apcu.php

    r1264760 r1268264  
    1111        /* verify apcu functions exist, apcu extension is loaded */
    1212        if ( ! function_exists( 'apcu_cache_info' ) ) {
    13             $this->log (  __translate__('APCu extension missing', $this->plugin_constant ) );
     13            $this->log (  __translate__('APCu extension missing', 'wp-ffpc' ) );
    1414            return false;
    1515        }
     
    1717        /* verify apcu is working */
    1818        if ( @apcu_cache_info("user") != false ) {
    19             $this->log (  __translate__('backend OK', $this->plugin_constant ) );
     19            $this->log (  __translate__('backend OK', 'wp-ffpc' ) );
    2020            $this->alive = true;
    2121        }
     
    8080        foreach ( $keys as $key => $dummy ) {
    8181            if ( ! apcu_delete ( $key ) ) {
    82                 $this->log ( sprintf( __translate__( 'Failed to delete APC entry: %s', $this->plugin_constant ),  $key ), LOG_WARNING );
    83                 //throw new Exception ( __translate__('Deleting APC entry failed with key ', $this->plugin_constant ) . $key );
     82                $this->log ( sprintf( __translate__( 'Failed to delete APC entry: %s', 'wp-ffpc' ),  $key ), LOG_WARNING );
     83                //throw new Exception ( __translate__('Deleting APC entry failed with key ', 'wp-ffpc' ) . $key );
    8484            }
    8585            else {
    86                 $this->log ( sprintf( __translate__( 'APC entry delete: %s', $this->plugin_constant ),  $key ) );
     86                $this->log ( sprintf( __translate__( 'APC entry delete: %s', 'wp-ffpc' ),  $key ) );
    8787            }
    8888        }
  • wp-ffpc/trunk/backends/memcache.php

    r1264760 r1268264  
    1010        /* Memcached class does not exist, Memcache extension is not available */
    1111        if (!class_exists('Memcache')) {
    12             $this->log (  __translate__('PHP Memcache extension missing', $this->plugin_constant ), LOG_WARNING );
     12            $this->log (  __translate__('PHP Memcache extension missing', 'wp-ffpc' ), LOG_WARNING );
    1313            return false;
    1414        }
     
    1616        /* check for existing server list, otherwise we cannot add backends */
    1717        if ( empty ( $this->options['servers'] ) && ! $this->alive ) {
    18             $this->log (  __translate__("servers list is empty, init failed", $this->plugin_constant ), LOG_WARNING );
     18            $this->log (  __translate__("servers list is empty, init failed", 'wp-ffpc' ), LOG_WARNING );
    1919            return false;
    2020        }
     
    2626        /* check if initialization was success or not */
    2727        if ( $this->connection === NULL ) {
    28             $this->log (  __translate__( 'error initializing Memcache PHP extension, exiting', $this->plugin_constant ) );
     28            $this->log (  __translate__( 'error initializing Memcache PHP extension, exiting', 'wp-ffpc' ) );
    2929            return false;
    3030        }
     
    3838                $this->status[$server_id] = $this->connection->connect ( $server['host'] , $server['port'] );
    3939
    40             $this->log ( sprintf( __translate__( '%s added', $this->plugin_constant ),  $server_id ) );
     40            $this->log ( sprintf( __translate__( '%s added', 'wp-ffpc' ),  $server_id ) );
    4141        }
    4242
     
    5252    protected  function _status () {
    5353        /* server status will be calculated by getting server stats */
    54         $this->log (  __translate__("checking server statuses", $this->plugin_constant ));
     54        $this->log (  __translate__("checking server statuses", 'wp-ffpc' ));
    5555        /* get servers statistic from connection */
    5656        foreach ( $this->options['servers'] as $server_id => $server ) {
     
    6060                $this->status[$server_id] = $this->connection->getServerStatus( $server['host'], $server['port'] );
    6161            if ( $this->status[$server_id] == 0 )
    62                 $this->log ( sprintf( __translate__( '%s server is down', $this->plugin_constant ),  $server_id ) );
     62                $this->log ( sprintf( __translate__( '%s server is down', 'wp-ffpc' ),  $server_id ) );
    6363            else
    64                 $this->log ( sprintf( __translate__( '%s server is up & running', $this->plugin_constant ),  $server_id ) );
     64                $this->log ( sprintf( __translate__( '%s server is up & running', 'wp-ffpc' ),  $server_id ) );
    6565        }
    6666    }
     
    111111
    112112            if ( $kresult === false ) {
    113                 $this->log ( sprintf( __translate__( 'unable to delete entry: %s', $this->plugin_constant ),  $key ) );
     113                $this->log ( sprintf( __translate__( 'unable to delete entry: %s', 'wp-ffpc' ),  $key ) );
    114114            }
    115115            else {
    116                 $this->log ( sprintf( __translate__( 'entry deleted: %s', $this->plugin_constant ),  $key ) );
     116                $this->log ( sprintf( __translate__( 'entry deleted: %s', 'wp-ffpc' ),  $key ) );
    117117            }
    118118        }
  • wp-ffpc/trunk/backends/memcached.php

    r1264760 r1268264  
    88        /* Memcached class does not exist, Memcached extension is not available */
    99        if (!class_exists('Memcached')) {
    10             $this->log (  __translate__(' Memcached extension missing, wp-ffpc will not be able to function correctly!', $this->plugin_constant ), LOG_WARNING );
     10            $this->log (  __translate__(' Memcached extension missing, wp-ffpc will not be able to function correctly!', 'wp-ffpc' ), LOG_WARNING );
    1111            return false;
    1212        }
     
    1414        /* check for existing server list, otherwise we cannot add backends */
    1515        if ( empty ( $this->options['servers'] ) && ! $this->alive ) {
    16             $this->log (  __translate__("Memcached servers list is empty, init failed", $this->plugin_constant ), LOG_WARNING );
     16            $this->log (  __translate__("Memcached servers list is empty, init failed", 'wp-ffpc' ), LOG_WARNING );
    1717            return false;
    1818        }
     
    3535        /* check if initialization was success or not */
    3636        if ( $this->connection === NULL ) {
    37             $this->log (  __translate__( 'error initializing Memcached PHP extension, exiting', $this->plugin_constant ) );
     37            $this->log (  __translate__( 'error initializing Memcached PHP extension, exiting', 'wp-ffpc' ) );
    3838            return false;
    3939        }
     
    6060            if ( !@array_key_exists($server_id , $servers_alive ) ) {
    6161                $this->connection->addServer( $server['host'], $server['port'] );
    62                 $this->log ( sprintf( __translate__( '%s added', $this->plugin_constant ),  $server_id ) );
     62                $this->log ( sprintf( __translate__( '%s added', 'wp-ffpc' ),  $server_id ) );
    6363            }
    6464        }
     
    7575    protected function _status () {
    7676        /* server status will be calculated by getting server stats */
    77         $this->log (  __translate__("checking server statuses", $this->plugin_constant ));
     77        $this->log (  __translate__("checking server statuses", 'wp-ffpc' ));
    7878        /* get server list from connection */
    7979        $servers =  $this->connection->getServerList();
     
    8383            /* reset server status to offline */
    8484            $this->status[$server_id] = 0;
    85                 if ($this->connection->set($this->plugin_constant, time())) {
    86                     $this->log ( sprintf( __translate__( '%s server is up & running', $this->plugin_constant ),  $server_id ) );
     85                if ($this->connection->set('wp-ffpc', time())) {
     86                    $this->log ( sprintf( __translate__( '%s server is up & running', 'wp-ffpc' ),  $server_id ) );
    8787                $this->status[$server_id] = 1;
    8888            }
     
    114114        if ( $result === false ) {
    115115            $code = $this->connection->getResultCode();
    116             $this->log ( sprintf( __translate__( 'unable to set entry: %s', $this->plugin_constant ),  $key ) );
    117             $this->log ( sprintf( __translate__( 'Memcached error code: %s', $this->plugin_constant ),  $code ) );
    118             //throw new Exception ( __translate__('Unable to store Memcached entry ', $this->plugin_constant ) . $key . __translate__( ', error code: ', $this->plugin_constant ) . $code );
     116            $this->log ( sprintf( __translate__( 'unable to set entry: %s', 'wp-ffpc' ),  $key ) );
     117            $this->log ( sprintf( __translate__( 'Memcached error code: %s', 'wp-ffpc' ),  $code ) );
     118            //throw new Exception ( __translate__('Unable to store Memcached entry ', 'wp-ffpc' ) . $key . __translate__( ', error code: ', 'wp-ffpc' ) . $code );
    119119        }
    120120
     
    147147            if ( $kresult === false ) {
    148148                $code = $this->connection->getResultCode();
    149                 $this->log ( sprintf( __translate__( 'unable to delete entry: %s', $this->plugin_constant ),  $key ) );
    150                 $this->log ( sprintf( __translate__( 'Memcached error code: %s', $this->plugin_constant ),  $code ) );
     149                $this->log ( sprintf( __translate__( 'unable to delete entry: %s', 'wp-ffpc' ),  $key ) );
     150                $this->log ( sprintf( __translate__( 'Memcached error code: %s', 'wp-ffpc' ),  $code ) );
    151151            }
    152152            else {
    153                 $this->log ( sprintf( __translate__( 'entry deleted: %s', $this->plugin_constant ),  $key ) );
     153                $this->log ( sprintf( __translate__( 'entry deleted: %s', 'wp-ffpc' ),  $key ) );
    154154            }
    155155        }
  • wp-ffpc/trunk/readme.txt

    r1266062 r1268264  
    55Requires at least: 3.0
    66Tested up to: 4.3.1
    7 Stable tag: 1.9.0
     7Stable tag: 1.9.1
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    129129* every ..C indicates bugfixes for A.B version.
    130130
     131= 1.9.1 =
     132*2015-10-18*
     133
     134* bugfix for is_writable check failures ( see: https://wordpress.org/support/topic/settings-saved-but-getting-not-saved-error-message)
     135* bugfix for memcached.protocol notice
     136* typo fixes
     137* replace variable with string constant in translatable messages
     138
    131139= 1.9.0 =
    132140*2015-10-14*
  • wp-ffpc/trunk/wp-ffpc-abstract.php

    r1266062 r1268264  
    88    else {
    99        function __translate__ ( $text, $domain ) { return $text; }
     10    }
     11}
     12
     13if ( !function_exists ('__debug__') ) {
     14    /* __ only availabe if we're running from the inside of wordpress, not in advanced-cache.php phase */
     15    function __debug__ ( $text ) {
     16        if ( defined('WP_FFPC__DEBUG_MODE') && WP_FFPC__DEBUG_MODE == true)
     17            error_log ( __FILE__ . ': ' . $text );
    1018    }
    1119}
  • wp-ffpc/trunk/wp-ffpc-backend.php

    r1266062 r1268264  
    2323    const port_separator  = ':';
    2424
    25     protected $plugin_constant = 'wp-ffpc';
    2625    protected $connection = NULL;
    2726    protected $alive = false;
     
    243242
    244243            /* proxy to internal function */
    245             $internal = $this->_flush();
     244            $result = $this->_flush();
    246245
    247246            if ( $result === false )
  • wp-ffpc/trunk/wp-ffpc-class.php

    r1266062 r1268264  
    6868     */
    6969    public function plugin_post_construct () {
     70        static::debug ( __CLASS__, 'post_construct' );
    7071        $this->plugin_url = plugin_dir_url( __FILE__ );
    7172        $this->plugin_dir = plugin_dir_path( __FILE__ );
     
    7980     */
    8081    public function plugin_pre_init() {
     82        static::debug ( __CLASS__, 'pre_init' );
    8183        /* advanced cache "worker" file */
    8284        $this->acache_worker = $this->plugin_dir . $this->plugin_constant . '-acache.php';
     
    243245        if ( extension_loaded ( 'memcache' )  ) {
    244246            $memcache_settings = ini_get_all( 'memcache' );
    245             if ( !empty ( $memcache_settings ) && $this->options['cache_type'] == 'memcache' )
     247            if ( !empty ( $memcache_settings ) && $this->options['cache_type'] == 'memcache' && isset($memcache_settings['memcache.protocol']) )
    246248            {
    247249                $memcache_protocol = strtolower($memcache_settings['memcache.protocol']['local_value']);
     
    10011003    private function deploy_advanced_cache( ) {
    10021004
    1003         if ( !is_writable( $this->acache )) {
     1005        if (!touch($this->acache)) {
    10041006            error_log('Generating advanced-cache.php failed: '.$this->acache.' is not writable');
    10051007            return false;
     
    10111013            return false;
    10121014        }
     1015
    10131016
    10141017        /* add the required includes and generate the needed code */
  • wp-ffpc/trunk/wp-ffpc.php

    r1266062 r1268264  
    44Plugin URI: https://github.com/petermolnar/wp-ffpc
    55Description: WordPress in-memory full page cache plugin
    6 Version: 1.9.0
     6Version: 1.9.1
    77Author: Peter Molnar <hello@petermolnar.eu>
    88Author URI: http://petermolnar.eu/
Note: See TracChangeset for help on using the changeset viewer.