Plugin Directory

Changeset 560602


Ignore:
Timestamp:
06/19/2012 03:09:10 PM (14 years ago)
Author:
rukbat
Message:

Upgrade to version 1.3.4.3

Location:
nginx-manager/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • nginx-manager/trunk/nginx-manager.php

    r511632 r560602  
    55Description: Manage Nginx cache
    66Author: Simone Fumagalli & Marco Zanzottera
    7 Version: 1.3.4.2
     7Version: 1.3.4.3
    88Author URI: http://www.iliveinperego.com
    99Network: true
    1010License URI: http://www.gnu.org/licenses/gpl.html
    1111 
    12     Copyright 2007    Simone Fumagalli
     12    Copyright 2010    Simone Fumagalli & Marco Zanzottera
    1313
    1414    This program is free software; you can redistribute it and/or modify
     
    4444    class nginxmLoader {
    4545       
    46         var $version            = '1.3.4.2'; // Plugin version
     46        var $version            = '1.3.4.3'; // Plugin version
    4747        var $db_version         = '1.3.4'; // DB version, change it to show the upgrade page
    4848        var $minium_WP          = '3.0';
     
    125125            add_action( 'delete_term', array(&$nginxmNginx, 'purge_on_term_taxonomy_edited'), 20, 3 );
    126126           
    127             /* Purge homepage when widgets are dragged to a sidebar, @since Nginx Manager 1.3.2 */
    128             add_action( 'update_option_sidebars_widgets', array(&$nginxmNginx, 'purge_on_sidebar_widgets_updated'), 20, 2 );
     127            /* Purge homepage when 'check_ajax_referer' action is triggered, @since Nginx Manager 1.3.4.3 */
     128            add_action( 'check_ajax_referer', array(&$nginxmNginx, 'purge_on_check_ajax_referer'), 20, 2 );
    129129           
    130130            /* Integrations with other plugins */
     
    203203            global $blog_id, $nginxmNginx;
    204204           
     205            /**
     206             * Purge post on post transition status
     207             * @since Nginx Manager 1.3.4.3
     208             */
     209            if ( $old_status != $new_status
     210                && $old_status != 'inherit'
     211                && $new_status != 'inherit'
     212                && $old_status != 'auto-draft'
     213                && $new_status != 'auto-draft'
     214                && $new_status != 'publish'
     215                && !wp_is_post_revision( $post->ID ) ) {
     216               
     217                $nginxmNginx->log( "Purge post on transition post STATUS from ".$old_status." to ".$new_status );
     218               
     219                $nginxmNginx->purgePost($post->ID);
     220               
     221            }
     222           
    205223            if ($new_status == 'future') {
    206224               
  • nginx-manager/trunk/nginxmNginx.php

    r511632 r560602  
    1 <?php
    2 /*  Copyright 2007    Simone Fumagalli
    3 
    4     This program is free software; you can redistribute it and/or modify
    5     it under the terms of the GNU General Public License as published by
    6     the Free Software Foundation; either version 2 of the License, or
    7     (at your option) any later version.
    8 
    9     This program is distributed in the hope that it will be useful,
    10     but WITHOUT ANY WARRANTY; without even the implied warranty of
    11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    12     GNU General Public License for more details.
    13 
    14     You should have received a copy of the GNU General Public License
    15     along with this program; if not, write to the Free Software
    16     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    17 
    18 */
     1<?php
    192
    203if (!class_exists('nginxmNginx')) {
     
    285268           
    286269            $_url_purge = $parse['scheme'].'://'.$parse['host'].'/purge'.$parse['path'];
    287             if ( $parse['query'] ) {
     270            if ( isset($parse['query']) && $parse['query'] != '' ) {
    288271                $_url_purge .= '?'.$parse['query'];
    289272            }
     
    892875       
    893876        /**
    894          * Purge homepage when widgets are dragged to a sidebar
    895          *
    896          * @param $oldvalue : Array, old option values
    897          * @param $_newvalue : Array, new option values
    898          * @return Boolean
    899          *
    900          * @since Nginx Manager 1.3.2
    901          */
    902         function purge_on_sidebar_widgets_updated( $oldvalue, $_newvalue ) {
    903            
    904             $this->log( __( "Widget moved or removed in a sidebar", "nginxm" ) );
    905            
    906             // Purge homepage
    907             $this->_purge_homepage();
    908            
    909             /**
    910              * @todo: add "purge by options" system
    911              */
     877         * Purge homepage when check_ajax_referer action is triggered.
     878         *
     879         * @param string $action
     880         * @param string $result
     881         * @return boolean
     882         */
     883        function purge_on_check_ajax_referer($action, $result) {
     884           
     885            switch ($action) {
     886               
     887                case 'save-sidebar-widgets' :
     888                   
     889                    $this->log( __( "Widget saved, moved or removed in a sidebar", "nginxm" ) );
     890                   
     891                    // Purge homepage
     892                    $this->_purge_homepage();
     893
     894                    break;
     895                   
     896                default :
     897                    break;
     898                   
     899            }
    912900           
    913901            return true;
  • nginx-manager/trunk/readme.txt

    r511632 r560602  
    33Tags: cache, nginx, purge, performance
    44Requires at least: 3.0
    5 Tested up to: 3.3.1
     5Tested up to: 3.4
    66Stable tag: trunk
    77
     
    6262
    6363== Changelog ==
     64
     65= 1.3.4.3 (2012 06 19) =
     66* EDIT : Purge (homepage) when widgets are saved or dragged to a sidebar (thx David Scatigna & metalitalia.com crew)
     67* NEW : Purge post on post transition status (thx David Scatigna & metalitalia.com crew)
    6468
    6569= 1.3.4.2 (2012 02 29) =
Note: See TracChangeset for help on using the changeset viewer.