Nginx Helper - Version 1.6.4

Version Description

  • Improved code for map generation to better conventions since the nesting confused some servers.
  • Added map update process to admin_init for frequent refreshes.
Download this release

Release Info

Developer saurabhshukla
Plugin Icon 128x128 Nginx Helper
Version 1.6.4
Comparing to
See all releases

Code changes from version 1.6.3 to 1.6.4

Files changed (2) hide show
  1. nginx-helper.php +13 -8
  2. readme.txt +7 -3
nginx-helper.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Nginx Helper
4
  Plugin URI: http://rtcamp.com/
5
  Description: An nginx helper that serves various functions.
6
- Version: 1.6.3
7
  Author: rtCamp
8
  Author URI: http://rtcamp.com
9
  Requires at least: 3.0
@@ -42,6 +42,7 @@ namespace rtCamp\WP\Nginx {
42
 
43
  global $rt_wp_nginx_purger;
44
  add_action( 'shutdown', array( &$this, 'add_timestamps' ), 99999 );
 
45
 
46
  add_action( 'publish_post', array( &$rt_wp_nginx_purger, 'purgePost' ), 200, 1 );
47
  add_action( 'publish_page', array( &$rt_wp_nginx_purger, 'purgePost' ), 200, 1 );
@@ -213,20 +214,24 @@ namespace rtCamp\WP\Nginx {
213
 
214
  if ( $rt_all_blogs )
215
  foreach ( $rt_all_blogs as $blog ){
216
- if ( SUBDOMAIN_INSTALL == "yes" )
217
  $rt_nginx_map_array[$blog->domain] = $blog->blog_id;
218
  }else{
219
- if ( $blog->blog_id != 1 )
220
- $rt_nginx_map_array[$blog->path] = $blog->blog_id;
 
221
  }
 
222
 
223
- if ( $rt_domain_map_sites )
224
- foreach ( $rt_domain_map_sites as $site )
225
  $rt_nginx_map_array[$site->domain] = $site->blog_id;
 
 
226
 
227
-
228
- foreach ( $rt_nginx_map_array as $domain=>$domain_id )
229
  $rt_nginx_map .= "\t" . $domain . "\t" . $domain_id . ";\n";
 
230
 
231
  return $rt_nginx_map;
232
  }
3
  Plugin Name: Nginx Helper
4
  Plugin URI: http://rtcamp.com/
5
  Description: An nginx helper that serves various functions.
6
+ Version: 1.6.4
7
  Author: rtCamp
8
  Author URI: http://rtcamp.com
9
  Requires at least: 3.0
42
 
43
  global $rt_wp_nginx_purger;
44
  add_action( 'shutdown', array( &$this, 'add_timestamps' ), 99999 );
45
+ add_action( 'add_init', array(&$this, 'update_map') );
46
 
47
  add_action( 'publish_post', array( &$rt_wp_nginx_purger, 'purgePost' ), 200, 1 );
48
  add_action( 'publish_page', array( &$rt_wp_nginx_purger, 'purgePost' ), 200, 1 );
214
 
215
  if ( $rt_all_blogs )
216
  foreach ( $rt_all_blogs as $blog ){
217
+ if ( SUBDOMAIN_INSTALL == "yes" ){
218
  $rt_nginx_map_array[$blog->domain] = $blog->blog_id;
219
  }else{
220
+ if ( $blog->blog_id != 1 ){
221
+ $rt_nginx_map_array[$blog->path] = $blog->blog_id;
222
+ }
223
  }
224
+ }
225
 
226
+ if ( $rt_domain_map_sites ){
227
+ foreach ( $rt_domain_map_sites as $site ){
228
  $rt_nginx_map_array[$site->domain] = $site->blog_id;
229
+ }
230
+ }
231
 
232
+ foreach ( $rt_nginx_map_array as $domain=>$domain_id ){
 
233
  $rt_nginx_map .= "\t" . $domain . "\t" . $domain_id . ";\n";
234
+ }
235
 
236
  return $rt_nginx_map;
237
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: rtcamp, rahul286, saurabhshukla
3
  Tags: nginx, cache, purge, nginx map, nginx cache, maps, fastcgi, proxy, rewrite, permalinks
4
  Requires at least: 3.0
5
  Tested up to: 3.4.2
6
- Stable tag: 1.6.3
7
  License: GPLv2 or later (of-course)
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Donate Link: http://rtcamp.com/donate/
@@ -105,6 +105,10 @@ Its just that we are hyperactive on our own forum!
105
 
106
  == Changelog ==
107
 
 
 
 
 
108
  = 1.6.3 =
109
  * Fixed duplicate entries.
110
 
@@ -185,5 +189,5 @@ Its just that we are hyperactive on our own forum!
185
 
186
  == Upgrade Notice ==
187
 
188
- = 1.6.3 =
189
- Revised multisite map support.
3
  Tags: nginx, cache, purge, nginx map, nginx cache, maps, fastcgi, proxy, rewrite, permalinks
4
  Requires at least: 3.0
5
  Tested up to: 3.4.2
6
+ Stable tag: 1.6.4
7
  License: GPLv2 or later (of-course)
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Donate Link: http://rtcamp.com/donate/
105
 
106
  == Changelog ==
107
 
108
+ = 1.6.4 =
109
+ * Improved code for map generation to better conventions since the nesting confused some servers.
110
+ * Added map update process to admin_init for frequent refreshes.
111
+
112
  = 1.6.3 =
113
  * Fixed duplicate entries.
114
 
189
 
190
  == Upgrade Notice ==
191
 
192
+ = 1.6.4 =
193
+ Revised map generation.