MainWP Child Reports - Version 1.7

Version Description

  • 5-12-2017 =
  • Fixed: an issue with recording version numbers
  • Fixed: conflict with Select2 library
Download this release

Release Info

Developer mainwp
Plugin Icon 128x128 MainWP Child Reports
Version 1.7
Comparing to
See all releases

Code changes from version 1.6 to 1.7

connectors/installer.php CHANGED
@@ -224,14 +224,15 @@ class MainWP_WP_Stream_Connector_Installer extends MainWP_WP_Stream_Connector {
224
  $slugs = $extra['plugins'];
225
  } else {
226
  $slugs = array( $upgrader->skin->plugin );
227
- }
228
-
229
  foreach ( $slugs as $slug ) {
230
  $plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $slug );
231
  $name = $plugin_data['Name'];
232
  $version = $plugin_data['Version'];
233
- $old_version = $upgrader->skin->plugin_info['Version']; // to fix old version
234
- $logs[] = compact( 'slug', 'name', 'old_version', 'version', 'message', 'action' );
 
 
235
  }
236
  } else { // theme
237
  if ( isset( $extra['bulk'] ) && true == $extra['bulk'] ) {
@@ -244,10 +245,11 @@ class MainWP_WP_Stream_Connector_Installer extends MainWP_WP_Stream_Connector {
244
  $stylesheet = $theme['Stylesheet Dir'] . '/style.css';
245
  $theme_data = get_file_data( $stylesheet, array( 'Version' => 'Version' ) );
246
  $name = $theme['Name'];
247
- $old_version = $upgrader->skin->theme_info->get('Version'); // to fix old version //$theme['Version'];
248
  $version = $theme_data['Version'];
249
-
250
- $logs[] = compact( 'slug', 'name', 'old_version', 'version', 'message', 'action' );
 
251
  }
252
  }
253
  } else {
224
  $slugs = $extra['plugins'];
225
  } else {
226
  $slugs = array( $upgrader->skin->plugin );
227
+ }
 
228
  foreach ( $slugs as $slug ) {
229
  $plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $slug );
230
  $name = $plugin_data['Name'];
231
  $version = $plugin_data['Version'];
232
+ $old_version = $upgrader->skin->plugin_info['Version']; // to fix old version
233
+ if (version_compare($version, $old_version, '>')) { // to fix
234
+ $logs[] = compact( 'slug', 'name', 'old_version', 'version', 'message', 'action' );
235
+ }
236
  }
237
  } else { // theme
238
  if ( isset( $extra['bulk'] ) && true == $extra['bulk'] ) {
245
  $stylesheet = $theme['Stylesheet Dir'] . '/style.css';
246
  $theme_data = get_file_data( $stylesheet, array( 'Version' => 'Version' ) );
247
  $name = $theme['Name'];
248
+ $old_version = $upgrader->skin->theme_info->get('Version'); // to fix old version //$theme['Version'];
249
  $version = $theme_data['Version'];
250
+ if (version_compare($version, $old_version, '>')) { // to fix
251
+ $logs[] = compact( 'slug', 'name', 'old_version', 'version', 'message', 'action' );
252
+ }
253
  }
254
  }
255
  } else {
includes/admin.php CHANGED
@@ -422,6 +422,10 @@ class MainWP_WP_Stream_Admin {
422
  }
423
 
424
  $days = $options['general_records_ttl'];
 
 
 
 
425
  $date = new DateTime( 'now', $timezone = new DateTimeZone( 'UTC' ) );
426
 
427
  $date->sub( DateInterval::createFromDateString( "$days days" ) );
422
  }
423
 
424
  $days = $options['general_records_ttl'];
425
+
426
+ if (empty($days))
427
+ return;
428
+
429
  $date = new DateTime( 'now', $timezone = new DateTimeZone( 'UTC' ) );
430
 
431
  $date->sub( DateInterval::createFromDateString( "$days days" ) );
mainwp-child-reports.php CHANGED
@@ -5,7 +5,7 @@
5
  Description: The MainWP Child Report plugin tracks Child sites for the MainWP Client Reports Extension. The plugin is only useful if you are using MainWP and the Client Reports Extension.
6
  Author: MainWP
7
  Author URI: https://mainwp.com
8
- Version: 1.6
9
  */
10
 
11
  /**
5
  Description: The MainWP Child Report plugin tracks Child sites for the MainWP Client Reports Extension. The plugin is only useful if you are using MainWP and the Client Reports Extension.
6
  Author: MainWP
7
  Author URI: https://mainwp.com
8
+ Version: 1.7
9
  */
10
 
11
  /**
readme.txt CHANGED
@@ -1,13 +1,13 @@
1
  === MainWP Child Reports ===
2
- Contributors: MainWP
3
  Donate link:
4
  Tags: MainWP Child Reports, MainWP, MainWP Child, MainWP Client Reports Extension, child reports, reports, actions, activity, admin, analytics, dashboard, log, notification, users, Backupwordpress, Updraftplus
5
  Author: mainwp
6
  Author URI: https://mainwp.com
7
  Plugin URI: https://mainwp.com
8
  Requires at least: 3.6
9
- Tested up to: 4.7.3
10
- Stable tag: 1.6
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
@@ -36,6 +36,10 @@ Credit to the [Stream Plugin](https://wordpress.org/plugins/stream/) which the M
36
 
37
  == Changelog ==
38
 
 
 
 
 
39
  = 1.6 - 4-4-2017 =
40
  * Fixed: Select2 conflict with WooCommerce 3.0
41
  * Fixed: an issue with returning incorrect date range in reports
1
  === MainWP Child Reports ===
2
+ Contributors: maiwnp
3
  Donate link:
4
  Tags: MainWP Child Reports, MainWP, MainWP Child, MainWP Client Reports Extension, child reports, reports, actions, activity, admin, analytics, dashboard, log, notification, users, Backupwordpress, Updraftplus
5
  Author: mainwp
6
  Author URI: https://mainwp.com
7
  Plugin URI: https://mainwp.com
8
  Requires at least: 3.6
9
+ Tested up to: 4.9
10
+ Stable tag: 1.7
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
36
 
37
  == Changelog ==
38
 
39
+ = 1.7 - 5-12-2017 =
40
+ * Fixed: an issue with recording version numbers
41
+ * Fixed: conflict with Select2 library
42
+
43
  = 1.6 - 4-4-2017 =
44
  * Fixed: Select2 conflict with WooCommerce 3.0
45
  * Fixed: an issue with returning incorrect date range in reports