Changeset 560602
- Timestamp:
- 06/19/2012 03:09:10 PM (14 years ago)
- Location:
- nginx-manager/trunk
- Files:
-
- 3 edited
-
nginx-manager.php (modified) (4 diffs)
-
nginxmNginx.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
nginx-manager/trunk/nginx-manager.php
r511632 r560602 5 5 Description: Manage Nginx cache 6 6 Author: Simone Fumagalli & Marco Zanzottera 7 Version: 1.3.4. 27 Version: 1.3.4.3 8 8 Author URI: http://www.iliveinperego.com 9 9 Network: true 10 10 License URI: http://www.gnu.org/licenses/gpl.html 11 11 12 Copyright 20 07 Simone Fumagalli12 Copyright 2010 Simone Fumagalli & Marco Zanzottera 13 13 14 14 This program is free software; you can redistribute it and/or modify … … 44 44 class nginxmLoader { 45 45 46 var $version = '1.3.4. 2'; // Plugin version46 var $version = '1.3.4.3'; // Plugin version 47 47 var $db_version = '1.3.4'; // DB version, change it to show the upgrade page 48 48 var $minium_WP = '3.0'; … … 125 125 add_action( 'delete_term', array(&$nginxmNginx, 'purge_on_term_taxonomy_edited'), 20, 3 ); 126 126 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 ); 129 129 130 130 /* Integrations with other plugins */ … … 203 203 global $blog_id, $nginxmNginx; 204 204 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 205 223 if ($new_status == 'future') { 206 224 -
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 19 2 20 3 if (!class_exists('nginxmNginx')) { … … 285 268 286 269 $_url_purge = $parse['scheme'].'://'.$parse['host'].'/purge'.$parse['path']; 287 if ( $parse['query']) {270 if ( isset($parse['query']) && $parse['query'] != '' ) { 288 271 $_url_purge .= '?'.$parse['query']; 289 272 } … … 892 875 893 876 /** 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 } 912 900 913 901 return true; -
nginx-manager/trunk/readme.txt
r511632 r560602 3 3 Tags: cache, nginx, purge, performance 4 4 Requires at least: 3.0 5 Tested up to: 3. 3.15 Tested up to: 3.4 6 6 Stable tag: trunk 7 7 … … 62 62 63 63 == 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) 64 68 65 69 = 1.3.4.2 (2012 02 29) =
Note: See TracChangeset
for help on using the changeset viewer.