Activity Log - Version 2.8.1

Version Description

  • 2021-12-01 =
  • Fix: Activity log database table not being dropped after deleting the plugin in multisite installation
Download this release

Release Info

Developer KingYes
Plugin Icon 128x128 Activity Log
Version 2.8.1
Comparing to
See all releases

Code changes from version 2.8.0 to 2.8.1

aryo-activity-log.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://activitylog.io/?utm_source=wp-plugins&utm_campaign=plugin-ur
5
  Description: Get aware of any activities that are taking place on your dashboard! Imagine it like a black-box for your WordPress site. e.g. post was deleted, plugin was activated, user logged in or logged out - it's all these for you to see.
6
  Author: Activity Log Team
7
  Author URI: https://activitylog.io/?utm_source=wp-plugins&utm_campaign=author-uri&utm_medium=wp-dash
8
- Version: 2.8.0
9
  Text Domain: aryo-activity-log
10
  License: GPLv2 or later
11
 
5
  Description: Get aware of any activities that are taking place on your dashboard! Imagine it like a black-box for your WordPress site. e.g. post was deleted, plugin was activated, user logged in or logged out - it's all these for you to see.
6
  Author: Activity Log Team
7
  Author URI: https://activitylog.io/?utm_source=wp-plugins&utm_campaign=author-uri&utm_medium=wp-dash
8
+ Version: 2.8.1
9
  Text Domain: aryo-activity-log
10
  License: GPLv2 or later
11
 
classes/class-aal-maintenance.php CHANGED
@@ -7,56 +7,44 @@ class AAL_Maintenance {
7
  global $wpdb;
8
 
9
  if ( function_exists( 'is_multisite') && is_multisite() && $network_wide ) {
10
- $old_blog_id = $wpdb->blogid;
11
-
12
  $blog_ids = $wpdb->get_col( "SELECT blog_id FROM {$wpdb->blogs}" );
13
  foreach ( $blog_ids as $blog_id ) {
14
  switch_to_blog( $blog_id );
15
  self::_create_tables();
 
16
  }
17
-
18
- switch_to_blog( $old_blog_id );
19
  } else {
20
  self::_create_tables();
21
  }
22
  }
23
 
24
- public static function uninstall( $network_deactivating ) {
25
  global $wpdb;
26
 
27
- if ( function_exists( 'is_multisite') && is_multisite() && $network_deactivating ) {
28
- $old_blog_id = $wpdb->blogid;
29
-
30
  $blog_ids = $wpdb->get_col( "SELECT blog_id FROM {$wpdb->blogs};" );
31
  foreach ( $blog_ids as $blog_id ) {
32
  switch_to_blog( $blog_id );
33
  self::_remove_tables();
 
34
  }
35
-
36
- switch_to_blog( $old_blog_id );
37
  } else {
38
  self::_remove_tables();
39
  }
40
  }
41
 
42
  public static function mu_new_blog_installer( $blog_id, $user_id, $domain, $path, $site_id, $meta ) {
43
- global $wpdb;
44
-
45
  if ( is_plugin_active_for_network( ACTIVITY_LOG_BASE ) ) {
46
- $old_blog_id = $wpdb->blogid;
47
  switch_to_blog( $blog_id );
48
  self::_create_tables();
49
- switch_to_blog( $old_blog_id );
50
  }
51
  }
52
 
53
  public static function mu_delete_blog( $blog_id, $drop ) {
54
- global $wpdb;
55
-
56
- $old_blog_id = $wpdb->blogid;
57
  switch_to_blog( $blog_id );
58
  self::_remove_tables();
59
- switch_to_blog( $old_blog_id );
60
  }
61
 
62
  protected static function _create_tables() {
7
  global $wpdb;
8
 
9
  if ( function_exists( 'is_multisite') && is_multisite() && $network_wide ) {
 
 
10
  $blog_ids = $wpdb->get_col( "SELECT blog_id FROM {$wpdb->blogs}" );
11
  foreach ( $blog_ids as $blog_id ) {
12
  switch_to_blog( $blog_id );
13
  self::_create_tables();
14
+ restore_current_blog();
15
  }
 
 
16
  } else {
17
  self::_create_tables();
18
  }
19
  }
20
 
21
+ public static function uninstall() {
22
  global $wpdb;
23
 
24
+ if ( function_exists( 'is_multisite') && is_multisite() ) {
 
 
25
  $blog_ids = $wpdb->get_col( "SELECT blog_id FROM {$wpdb->blogs};" );
26
  foreach ( $blog_ids as $blog_id ) {
27
  switch_to_blog( $blog_id );
28
  self::_remove_tables();
29
+ restore_current_blog();
30
  }
 
 
31
  } else {
32
  self::_remove_tables();
33
  }
34
  }
35
 
36
  public static function mu_new_blog_installer( $blog_id, $user_id, $domain, $path, $site_id, $meta ) {
 
 
37
  if ( is_plugin_active_for_network( ACTIVITY_LOG_BASE ) ) {
 
38
  switch_to_blog( $blog_id );
39
  self::_create_tables();
40
+ restore_current_blog();
41
  }
42
  }
43
 
44
  public static function mu_delete_blog( $blog_id, $drop ) {
 
 
 
45
  switch_to_blog( $blog_id );
46
  self::_remove_tables();
47
+ restore_current_blog();
48
  }
49
 
50
  protected static function _create_tables() {
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: pojo.me, KingYes, ariel.k, maor
3
  Tags: Activity Log, User Activity, User Log, Audit Log, Security, Tracking, WooCommerce, bbPress, GDPR,
4
  Requires at least: 4.4
5
  Tested up to: 5.8
6
- Stable tag: 2.8.0
7
  License: GPLv2 or later
8
 
9
  The #1 Activity Log plugin helps you monitor & log all changes and activities on your WordPress site, so you can run more securely and organized. Works simple & completely free!
@@ -108,6 +108,9 @@ Would you like to like to contribute to Activity Log? You are more than welcome
108
 
109
  == Changelog ==
110
 
 
 
 
111
  = 2.8.0 - 2021-11-17 =
112
  * New: Added Privacy Settings to records log
113
  * New: Added Site Language to records log
3
  Tags: Activity Log, User Activity, User Log, Audit Log, Security, Tracking, WooCommerce, bbPress, GDPR,
4
  Requires at least: 4.4
5
  Tested up to: 5.8
6
+ Stable tag: 2.8.1
7
  License: GPLv2 or later
8
 
9
  The #1 Activity Log plugin helps you monitor & log all changes and activities on your WordPress site, so you can run more securely and organized. Works simple & completely free!
108
 
109
  == Changelog ==
110
 
111
+ = 2.8.1 - 2021-12-01 =
112
+ * Fix: Activity log database table not being dropped after deleting the plugin in multisite installation
113
+
114
  = 2.8.0 - 2021-11-17 =
115
  * New: Added Privacy Settings to records log
116
  * New: Added Site Language to records log