From 20cf1005629711c40917481b0cc5b83803c15784 Mon Sep 17 00:00:00 2001 From: jaswsinc Date: Fri, 2 Dec 2016 00:43:56 -0900 Subject: [PATCH] - **Bug Fix:** The conflict check for 'Subscribe to Comments Reloaded' was not working in the previous release; i.e., if you attempt to activate both Comment Mail and the 'Subscribe to Comments Reloaded' plugin at the same, this should result in a Dashboard warning. Fixed in this release. See [Issue #315](https://github.com/websharks/comment-mail/issues/315). --- CHANGELOG.md | 2 ++ src/includes/classes/Conflicts.php | 13 ++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d894ca..5f84b3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## [coming soon] +- **Bug Fix:** The conflict check for 'Subscribe to Comments Reloaded' was not working in the previous release; i.e., if you attempt to activate both Comment Mail and the 'Subscribe to Comments Reloaded' plugin at the same, this should result in a Dashboard warning. Fixed in this release. See [Issue #315](https://github.com/websharks/comment-mail/issues/315). + - **Bug Fix:** Prevent browser autocomplete in Comment Mail options. See [Issue #319](https://github.com/websharks/comment-mail/issues/319). - **Bug Fix:** Conflict checks between lite and pro corrected. This was not working properly in the previous release; i.e., installing Comment Mail Pro when Comment Mail Lite is already running should result in Comment Mail Lite being deactivated automatically. See [Issue #270](https://github.com/websharks/comment-mail/issues/270). diff --git a/src/includes/classes/Conflicts.php b/src/includes/classes/Conflicts.php index dd42221..f03894b 100644 --- a/src/includes/classes/Conflicts.php +++ b/src/includes/classes/Conflicts.php @@ -34,10 +34,13 @@ protected static function doCheck() $lite_slug = str_replace('_', '-', GLOBAL_NS); $pro_slug = $lite_slug.'-pro'; // Pro suffix. - $conflicting_plugin_slugs = [IS_PRO ? $lite_slug : $pro_slug]; - $active_plugins = (array) get_option('active_plugins', array()); - $active_sitewide_plugins = is_multisite() ? array_keys((array) get_site_option('active_sitewide_plugins', array())) : array(); - $active_plugins = array_unique(array_merge($active_plugins, $active_sitewide_plugins)); + $conflicting_plugin_slugs = [ + IS_PRO ? $lite_slug : $pro_slug, + 'subscribe-to-comments-reloaded', + ]; + $active_plugins = (array) get_option('active_plugins', array()); + $active_sitewide_plugins = is_multisite() ? array_keys((array) get_site_option('active_sitewide_plugins', array())) : array(); + $active_plugins = array_unique(array_merge($active_plugins, $active_sitewide_plugins)); foreach ($active_plugins as $_active_plugin_basename) { if (!($_active_plugin_slug = strstr($_active_plugin_basename, '/', true))) { @@ -97,7 +100,7 @@ protected static function maybeEnqueueNotice() } echo '
'.// Error notice. '

'.// Running one or more conflicting plugins at the same time. - ' '.sprintf(__('%1$s is NOT running. A conflicting plugin, %2$s, is currently active. Please deactivate the %2$s plugin to clear this message.', SLUG_TD), esc_html($this_plugin_name), esc_html($conflicting_plugin_name)). + ' '.sprintf(__('%1$s is not running. A conflicting plugin, %2$s, is currently active at the same time. Please deactivate the %2$s plugin to clear this message.', SLUG_TD), esc_html($this_plugin_name), esc_html($conflicting_plugin_name)). '

'. '
'; });