Skip to content

Commit

Permalink
Phing release of v170220 with the following changes:
Browse files Browse the repository at this point in the history
- **New Feature:** Comet Cache can now be configured to automatically clear the cache for date-based archive views whenever any single post is cleared due to changes in content, title, etc. See: **Dashboard → Comet Cache → Plugin Options → Automatic Cache Clearing → Auto-Clear "Date-Based Archives" Too?**. See also: [Issue #724](#724).
- **New Pro Feature:** Apache Optimizations now include a new option that allows site owners to enforce an exact host name for all requests. See: **Dashboard → Comet Cache Pro → Plugin Options → Apache Optimizations → Enforce an Exact Host Name?**. See also: [Issue #101](#101).
- **Bug Fix:** Apache detection sometimes inaccurate. So instead of using default WP core globals for server detection, Comet Cache now uses it's own set of Apache/Nginx/IIS detection functions. And, this release enhances our Apache and Nginx detection routines; making them smart enough to catch additional edge cases; i.e., to further reduce the likelihood of there being a false-positive. See [Issue #748](#748).
- **Bug Fix:** Some XML-RPC and REST API requests were being cached inadvertently. See [Issue #855](#855).
- **Bug Fix:** Broken textarea field due to `white-space:nowrap` in Firefox. See [Issue #866](#866).
- **Bug Fix:** This release resolves empty directories being left in the cache folder, in some scenarios. See [Thread #866](https://forums.wpsharks.com/t/cache-folders-not-removed-during-clean-up-process/866).
- **Bug Fix** (Pro): Some REST requests were being redirected incorrectly whenever Apache Optimizations were enabled. See [Issue #855](#855).
- **Compatibility Bug Fix:** Some Jetpack API calls were being cached inadvertently. See [Issue #855](#855).
- **Enhancement:** Notes in HTML source now indicate fully functional on first load for improved clarity. See [Issue #860](#860).
- **Enhancement:** Enhancing security by removing `basename(__FILE__)` from direct access notices.
  • Loading branch information
raamdev committed Feb 20, 2017
1 parent fd62ce4 commit 3849005
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .gitchange
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1460135613
49dd4154d8f5d3b70691c8e3f52a063a49137fb7:57be33556df067.43016776
853d9120b42cf4f2eabe2f35ea18a6ace7170ea6:588bb5682f4739.12912408
d0e05c36184f81b133761b71ca6ee0136be67409:58926dbb57e4a4.36452623
d0e05c36184f81b133761b71ca6ee0136be67409:58ab78802b0522.43963767
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= v170201-RC =
= v170220 =

- **New Feature:** Comet Cache can now be configured to automatically clear the cache for date-based archive views whenever any single post is cleared due to changes in content, title, etc. See: **Dashboard → Comet Cache → Plugin Options → Automatic Cache Clearing → Auto-Clear "Date-Based Archives" Too?**. See also: [Issue #724](https://github.com/websharks/comet-cache/issues/724).
- **New Pro Feature:** Apache Optimizations now include a new option that allows site owners to enforce an exact host name for all requests. See: **Dashboard → Comet Cache Pro → Plugin Options → Apache Optimizations → Enforce an Exact Host Name?**. See also: [Issue #101](https://github.com/websharks/comet-cache/issues/101).
Expand All @@ -9,7 +9,7 @@
- **Bug Fix** (Pro): Some REST requests were being redirected incorrectly whenever Apache Optimizations were enabled. See [Issue #855](https://github.com/websharks/comet-cache/issues/855).
- **Compatibility Bug Fix:** Some Jetpack API calls were being cached inadvertently. See [Issue #855](https://github.com/websharks/comet-cache/issues/855).
- **Enhancement:** Notes in HTML source now indicate fully functional on first load for improved clarity. See [Issue #860](https://github.com/websharks/comet-cache/issues/860).
- **Code Cleanup:** Enhancing security by removing `basename(__FILE__)` from direct access notices.
- **Enhancement:** Enhancing security by removing `basename(__FILE__)` from direct access notices.

= v161227 =

Expand Down
2 changes: 1 addition & 1 deletion comet-cache.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
Version: 170201-RC
Version: 170220
Text Domain: comet-cache
Plugin Name: Comet Cache
Network: true
Expand Down
15 changes: 14 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=== Comet Cache ===

Stable tag: 170201-RC
Stable tag: 170220
Requires at least: 4.2
Tested up to: 4.8-alpha
Text Domain: comet-cache
Expand Down Expand Up @@ -340,6 +340,19 @@ Requires WordPress v4.2+.

== Changelog ==

= v170220 =

- **New Feature:** Comet Cache can now be configured to automatically clear the cache for date-based archive views whenever any single post is cleared due to changes in content, title, etc. See: **Dashboard → Comet Cache → Plugin Options → Automatic Cache Clearing → Auto-Clear "Date-Based Archives" Too?**. See also: [Issue #724](https://github.com/websharks/comet-cache/issues/724).
- **New Pro Feature:** Apache Optimizations now include a new option that allows site owners to enforce an exact host name for all requests. See: **Dashboard → Comet Cache Pro → Plugin Options → Apache Optimizations → Enforce an Exact Host Name?**. See also: [Issue #101](https://github.com/websharks/comet-cache/issues/101).
- **Bug Fix:** Apache detection sometimes inaccurate. So instead of using default WP core globals for server detection, Comet Cache now uses it's own set of Apache/Nginx/IIS detection functions. And, this release enhances our Apache and Nginx detection routines; making them smart enough to catch additional edge cases; i.e., to further reduce the likelihood of there being a false-positive. See [Issue #748](https://github.com/websharks/comet-cache/issues/748).
- **Bug Fix:** Some XML-RPC and REST API requests were being cached inadvertently. See [Issue #855](https://github.com/websharks/comet-cache/issues/855).
- **Bug Fix:** Broken textarea field due to `white-space:nowrap` in Firefox. See [Issue #866](https://github.com/websharks/comet-cache/issues/866).
- **Bug Fix:** This release resolves empty directories being left in the cache folder, in some scenarios. See [Thread #866](https://forums.wpsharks.com/t/cache-folders-not-removed-during-clean-up-process/866).
- **Bug Fix** (Pro): Some REST requests were being redirected incorrectly whenever Apache Optimizations were enabled. See [Issue #855](https://github.com/websharks/comet-cache/issues/855).
- **Compatibility Bug Fix:** Some Jetpack API calls were being cached inadvertently. See [Issue #855](https://github.com/websharks/comet-cache/issues/855).
- **Enhancement:** Notes in HTML source now indicate fully functional on first load for improved clarity. See [Issue #860](https://github.com/websharks/comet-cache/issues/860).
- **Enhancement:** Enhancing security by removing `basename(__FILE__)` from direct access notices.

= v161227 =

_**Note:** This is a Comet Cache Pro maintenance release._
Expand Down
2 changes: 1 addition & 1 deletion src/includes/classes/MenuPageOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,7 @@ public function __construct()
}
/* ----------------------------------------------------------------------------------------- */

if (!$this->plugin->isApache() || $this->plugin->isProPreview()) {
if ($this->plugin->isApache() || $this->plugin->isProPreview()) {
echo '<div class="plugin-menu-page-panel'.(!IS_PRO && $this->plugin->isProPreview() ? ' pro-preview' : '').'">'."\n";

echo ' <a href="#" class="plugin-menu-page-panel-heading" data-additional-pro-features="'.(!IS_PRO && $this->plugin->isProPreview() ? __('additional pro features', 'comet-cache') : '').'">'."\n";
Expand Down
4 changes: 2 additions & 2 deletions src/includes/interfaces/Shared/NcDebugConsts.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ interface NcDebugConsts
/**
* No-cache because it's an `XMLRPC_REQUEST`.
*
* @since 17xxxx Enhancing compatibility with API requests.
* @since 170220 Enhancing compatibility with API requests.
*
* @type string A unique string identifier in the set of `NC_DEBUG_` constants.
*/
Expand All @@ -78,7 +78,7 @@ interface NcDebugConsts
/**
* No-cache because it's a `REST_REQUEST`.
*
* @since 17xxxx Enhancing compatibility with API requests.
* @since 170220 Enhancing compatibility with API requests.
*
* @type string A unique string identifier in the set of `NC_DEBUG_` constants.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/includes/stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
require_once dirname(__DIR__).'/vendor/autoload.php';
require_once __DIR__.'/functions/i18n-utils.php';

${__FILE__}['version'] = '170201-RC'; //version//
${__FILE__}['version'] = '170220'; //version//
${__FILE__}['plugin'] = dirname(dirname(__DIR__));
${__FILE__}['plugin'] .= '/'.basename(${__FILE__}['plugin']).'.php';
${__FILE__}['ns_path'] = str_replace('\\', '/', __NAMESPACE__); // To dir/path.
Expand Down
4 changes: 2 additions & 2 deletions src/includes/traits/Ac/NcDebugUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function maybeSetDebugInfo($reason_code, $reason = '')
* Echoes `NC_DEBUG_` info in the WordPress `shutdown` phase (if applicable).
*
* @since 150422 Rewrite.
* @since 17xxxx Do not display for API requests.
* @since 170220 Do not display for API requests.
*
* @attaches-to `shutdown` hook in WordPress w/ a late priority.
*/
Expand Down Expand Up @@ -68,7 +68,7 @@ public function maybeEchoNcDebugInfo()
* Gets `NC_DEBUG_` info (if applicable).
*
* @since 150422 Rewrite.
* @since 17xxxx Adding API request constants.
* @since 170220 Adding API request constants.
*
* @param string $reason_code One of the `NC_DEBUG_` constants.
* @param string $reason Optional; to override the default description with a custom message.
Expand Down
4 changes: 2 additions & 2 deletions src/includes/traits/Ac/ObUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ trait ObUtils
* Start output buffering or serve cache.
*
* @since 150422 Rewrite.
* @since 17xxxx Adding API request constants.
* @since 170220 Adding API request constants.
*
* @note This is a vital part of Comet Cache.
* This method serves existing (fresh) cache files. It is also responsible
Expand Down Expand Up @@ -265,7 +265,7 @@ public function maybeStartOutputBuffering()
* Output buffer handler; i.e. the cache file generator.
*
* @since 150422 Rewrite.
* @since 17xxxx Adding API request constants.
* @since 170220 Adding API request constants.
*
* @param string $buffer The buffer from {@link \ob_start()}.
* @param int $phase A set of bitmask flags.
Expand Down
20 changes: 10 additions & 10 deletions src/includes/traits/Plugin/WcpDateArchiveUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ trait WcpDateArchiveUtils
/**
* Automatically clears date archives.
*
* @since 17xxxx Date archive clearing.
* @since 170220 Date archive clearing.
*
* @param int $post_id A WordPress post ID.
* @param bool $force Defaults to a `FALSE` value.
Expand Down Expand Up @@ -64,19 +64,19 @@ public function autoClearDateArchiveCache($post_id, $force = false)
$date_archive_urls = []; // Initialize archive urls.
$publish_time = get_post_time('U', true, $post_id);

$Y = strtotime('Y', $publish_time);
$m = strtotime('m', $publish_time);
$j = strtotime('j', $publish_time);
$Y = date('Y', $publish_time);
$m = date('m', $publish_time);
$j = date('j', $publish_time);

if ($this->options['cache_clear_date_archives_enable'] === '1') {
$date_archive_links[sprintf(__('%1$s Date Archive', 'comet-cache'), $Y)] = get_year_link($Y);
$date_archive_links[sprintf(__('%1$s/%2$s Date Archive', 'comet-cache'), $Y, $m)] = get_month_link($Y, $m);
$date_archive_links[sprintf(__('%1$s/%2$s/%3$s Date Archive', 'comet-cache'), $Y, $m, $j)] = get_day_link($Y, $m, $j);
$date_archive_urls[sprintf(__('%1$s Date Archive', 'comet-cache'), $Y)] = get_year_link($Y);
$date_archive_urls[sprintf(__('%1$s/%2$s Date Archive', 'comet-cache'), $Y, $m)] = get_month_link($Y, $m);
$date_archive_urls[sprintf(__('%1$s/%2$s/%3$s Date Archive', 'comet-cache'), $Y, $m, $j)] = get_day_link($Y, $m, $j);
} elseif ($this->options['cache_clear_date_archives_enable'] === '2') {
$date_archive_links[sprintf(__('%1$s/%2$s Date Archive', 'comet-cache'), $Y, $m)] = get_month_link($Y, $m);
$date_archive_links[sprintf(__('%1$s/%2$s/%3$s Date Archive', 'comet-cache'), $Y, $m, $j)] = get_day_link($Y, $m, $j);
$date_archive_urls[sprintf(__('%1$s/%2$s Date Archive', 'comet-cache'), $Y, $m)] = get_month_link($Y, $m);
$date_archive_urls[sprintf(__('%1$s/%2$s/%3$s Date Archive', 'comet-cache'), $Y, $m, $j)] = get_day_link($Y, $m, $j);
} else { // Assume $this->options['cache_clear_date_archives_enable'] === '3'
$date_archive_links[sprintf(__('%1$s/%2$s/%3$s Date Archive', 'comet-cache'), $Y, $m, $j)] = get_day_link($Y, $m, $j);
$date_archive_urls[sprintf(__('%1$s/%2$s/%3$s Date Archive', 'comet-cache'), $Y, $m, $j)] = get_day_link($Y, $m, $j);
}
foreach ($date_archive_urls as $_label => $_url) {
$_url_regex = $this->buildHostCachePathRegex($_url);
Expand Down

0 comments on commit 3849005

Please sign in to comment.