Cache Enabler – WordPress Cache - Version 1.8.3

Version Description

  • Update index file handling (#289)
Download this release

Release Info

Developer keycdn
Plugin Icon 128x128 Cache Enabler – WordPress Cache
Version 1.8.3
Comparing to
See all releases

Code changes from version 1.8.2 to 1.8.3

cache-enabler.php CHANGED
@@ -6,7 +6,7 @@ Description: Simple and fast WordPress caching plugin.
6
  Author: KeyCDN
7
  Author URI: https://www.keycdn.com
8
  License: GPLv2 or later
9
- Version: 1.8.2
10
  */
11
 
12
  /*
6
  Author: KeyCDN
7
  Author URI: https://www.keycdn.com
8
  License: GPLv2 or later
9
+ Version: 1.8.3
10
  */
11
 
12
  /*
constants.php CHANGED
@@ -6,7 +6,7 @@
6
  */
7
 
8
  $cache_enabler_constants = array(
9
- 'CACHE_ENABLER_VERSION' => '1.8.2',
10
  'CACHE_ENABLER_MIN_PHP' => '5.6',
11
  'CACHE_ENABLER_MIN_WP' => '5.5',
12
  'CACHE_ENABLER_DIR' => __DIR__,
6
  */
7
 
8
  $cache_enabler_constants = array(
9
+ 'CACHE_ENABLER_VERSION' => '1.8.3',
10
  'CACHE_ENABLER_MIN_PHP' => '5.6',
11
  'CACHE_ENABLER_MIN_WP' => '5.5',
12
  'CACHE_ENABLER_DIR' => __DIR__,
inc/cache_enabler_engine.class.php CHANGED
@@ -182,14 +182,24 @@ final class Cache_Enabler_Engine {
182
  /**
183
  * Whether the script being executed is the installation directory index file.
184
  *
 
 
 
 
185
  * @since 1.5.0
186
- * @change 1.8.0
187
  *
188
  * @return bool True if the script being executed is the index file, false if not.
189
  */
190
  private static function is_index() {
191
 
192
- if ( defined( 'CACHE_ENABLER_INDEX_FILE' ) && $_SERVER['SCRIPT_FILENAME'] === CACHE_ENABLER_INDEX_FILE ) {
 
 
 
 
 
 
193
  return true;
194
  }
195
 
182
  /**
183
  * Whether the script being executed is the installation directory index file.
184
  *
185
+ * This uses $_SERVER['SCRIPT_NAME'] instead of $_SERVER['SCRIPT_FILENAME']
186
+ * because it is in the CGI/1.1 specification. It checks whether
187
+ * CACHE_ENABLER_INDEX_FILE ends with $_SERVER['SCRIPT_NAME'].
188
+ *
189
  * @since 1.5.0
190
+ * @change 1.8.3
191
  *
192
  * @return bool True if the script being executed is the index file, false if not.
193
  */
194
  private static function is_index() {
195
 
196
+ if ( ! defined( 'CACHE_ENABLER_INDEX_FILE' ) ) {
197
+ return false;
198
+ }
199
+
200
+ $script_name_length = strlen( $_SERVER['SCRIPT_NAME'] );
201
+
202
+ if ( substr( CACHE_ENABLER_INDEX_FILE, -$script_name_length, $script_name_length ) === $_SERVER['SCRIPT_NAME'] ) {
203
  return true;
204
  }
205
 
readme.txt CHANGED
@@ -55,6 +55,9 @@ Cache Enabler captures page contents and saves it as a static HTML file on the s
55
 
56
  == Changelog ==
57
 
 
 
 
58
  = 1.8.2 =
59
  * Update cache size transient handling (#287)
60
 
55
 
56
  == Changelog ==
57
 
58
+ = 1.8.3 =
59
+ * Update index file handling (#289)
60
+
61
  = 1.8.2 =
62
  * Update cache size transient handling (#287)
63