LiteSpeed Cache - Version 3.6.3

Version Description

  • Mar 10 2021 =
  • Core Fixed potential upgrade failure when new versions have changes in activation related functions.
  • Core Upgrade process won't get deactivated anymore on Network setup.
Download this release

Release Info

Developer LiteSpeedTech
Plugin Icon 128x128 LiteSpeed Cache
Version 3.6.3
Comparing to
See all releases

Code changes from version 3.6.2 to 3.6.3

Files changed (4) hide show
  1. litespeed-cache.php +2 -2
  2. readme.txt +6 -2
  3. src/activation.cls.php +3 -15
  4. src/conf.cls.php +17 -8
litespeed-cache.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: LiteSpeed Cache
4
  * Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
5
  * Description: High-performance page caching and site optimization from LiteSpeed
6
- * Version: 3.6.2
7
  * Author: LiteSpeed Technologies
8
  * Author URI: https://www.litespeedtech.com
9
  * License: GPLv3
@@ -33,7 +33,7 @@ if ( class_exists( 'LiteSpeed\Core' ) || defined( 'LSCWP_DIR' ) ) {
33
  return;
34
  }
35
 
36
- ! defined( 'LSCWP_V' ) && define( 'LSCWP_V', '3.6.2' );
37
 
38
  ! defined( 'LSCWP_CONTENT_DIR' ) && define( 'LSCWP_CONTENT_DIR', WP_CONTENT_DIR ) ;
39
  ! defined( 'LSCWP_DIR' ) && define( 'LSCWP_DIR', __DIR__ . '/' ) ;// Full absolute path '/var/www/html/***/wp-content/plugins/litespeed-cache/' or MU
3
  * Plugin Name: LiteSpeed Cache
4
  * Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
5
  * Description: High-performance page caching and site optimization from LiteSpeed
6
+ * Version: 3.6.3
7
  * Author: LiteSpeed Technologies
8
  * Author URI: https://www.litespeedtech.com
9
  * License: GPLv3
33
  return;
34
  }
35
 
36
+ ! defined( 'LSCWP_V' ) && define( 'LSCWP_V', '3.6.3' );
37
 
38
  ! defined( 'LSCWP_CONTENT_DIR' ) && define( 'LSCWP_CONTENT_DIR', WP_CONTENT_DIR ) ;
39
  ! defined( 'LSCWP_DIR' ) && define( 'LSCWP_DIR', __DIR__ . '/' ) ;// Full absolute path '/var/www/html/***/wp-content/plugins/litespeed-cache/' or MU
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: LiteSpeedTech
3
  Tags: caching, optimize, performance, pagespeed, seo, speed, image optimize, compress, object cache, redis, memcached, database cleaner
4
  Requires at least: 4.0
5
- Tested up to: 5.6
6
- Stable tag: 3.6.2
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
 
@@ -247,6 +247,10 @@ The vast majority of plugins and themes are compatible with LiteSpeed Cache. The
247
 
248
  == Changelog ==
249
 
 
 
 
 
250
  = 3.6.2 - Feb 1 2021 =
251
  * **Page Optimize** Fixed an issue where network purge CSS/JS caused 404 errors for subsites.
252
  * **Page Optimize** Fixed an issue where purge CSS/JS only caused 404 errors.
2
  Contributors: LiteSpeedTech
3
  Tags: caching, optimize, performance, pagespeed, seo, speed, image optimize, compress, object cache, redis, memcached, database cleaner
4
  Requires at least: 4.0
5
+ Tested up to: 5.7
6
+ Stable tag: 3.6.3
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
 
247
 
248
  == Changelog ==
249
 
250
+ = 3.6.3 - Mar 10 2021 =
251
+ * **Core** Fixed potential upgrade failure when new versions have changes in activation related functions.
252
+ * **Core** Upgrade process won't get deactivated anymore on Network setup.
253
+
254
  = 3.6.2 - Feb 1 2021 =
255
  * **Page Optimize** Fixed an issue where network purge CSS/JS caused 404 errors for subsites.
256
  * **Page Optimize** Fixed an issue where purge CSS/JS only caused 404 errors.
src/activation.cls.php CHANGED
@@ -40,15 +40,11 @@ class Activation extends Instance {
40
  }
41
  }
42
 
43
- do_action( 'litespeed_load_thirdparty' );
44
-
45
- // Check new version @since 2.9.3
46
- Cloud::version_check( 'activate' . ( defined( 'LSCWP_REF' ) ? '_' . LSCWP_REF : '' ) );
47
 
48
  /* Network file handler */
49
-
50
  if ( is_multisite() ) {
51
-
52
  if ( ! is_network_admin() ) {
53
  if ( $count === 1 ) {
54
  // Only itself is activated, set .htaccess with only CacheLookUp
@@ -58,17 +54,9 @@ class Activation extends Instance {
58
  Admin_Display::error( $ex->getMessage() );
59
  }
60
  }
61
- return;
62
  }
63
-
64
- Conf::get_instance()->update_confs();
65
-
66
- return;
67
  }
68
 
69
- /* Single site file handler */
70
- Conf::get_instance()->update_confs();
71
-
72
  if ( defined( 'LSCWP_REF' ) && LSCWP_REF == 'whm' ) {
73
  GUI::update_option( GUI::WHM_MSG, GUI::WHM_MSG_VAL );
74
  }
@@ -413,7 +401,7 @@ class Activation extends Instance {
413
  $upgrader = new \Plugin_Upgrader( $skin );
414
  $result = $upgrader->upgrade( $plugin );
415
  if ( ! is_plugin_active( $plugin ) ) {// todo: upgrade should reactivate the plugin again by WP. Need to check why disabled after upgraded.
416
- activate_plugin( $plugin );
417
  }
418
  ob_end_clean();
419
  } catch ( \Exception $e ) {
40
  }
41
  }
42
 
43
+ // Files will be delayed updated in next visit to wp-admin
44
+ Conf::update_option( '__activation', Core::VER );
 
 
45
 
46
  /* Network file handler */
 
47
  if ( is_multisite() ) {
 
48
  if ( ! is_network_admin() ) {
49
  if ( $count === 1 ) {
50
  // Only itself is activated, set .htaccess with only CacheLookUp
54
  Admin_Display::error( $ex->getMessage() );
55
  }
56
  }
 
57
  }
 
 
 
 
58
  }
59
 
 
 
 
60
  if ( defined( 'LSCWP_REF' ) && LSCWP_REF == 'whm' ) {
61
  GUI::update_option( GUI::WHM_MSG, GUI::WHM_MSG_VAL );
62
  }
401
  $upgrader = new \Plugin_Upgrader( $skin );
402
  $result = $upgrader->upgrade( $plugin );
403
  if ( ! is_plugin_active( $plugin ) ) {// todo: upgrade should reactivate the plugin again by WP. Need to check why disabled after upgraded.
404
+ activate_plugin( $plugin, '', is_multisite() );
405
  }
406
  ob_end_clean();
407
  } catch ( \Exception $e ) {
src/conf.cls.php CHANGED
@@ -104,15 +104,15 @@ class Conf extends Base {
104
  }
105
  else {
106
  ! defined( 'LSCWP_CUR_V' ) && define( 'LSCWP_CUR_V', $ver );
107
- }
108
 
109
- /**
110
- * Upgrade conf
111
- */
112
- if ( $ver && $ver != Core::VER ) {
113
- // Plugin version will be set inside
114
- // Site plugin upgrade & version change will do in load_site_conf
115
- Data::get_instance()->conf_upgrade( $ver );
 
116
  }
117
 
118
  /**
@@ -140,6 +140,15 @@ class Conf extends Base {
140
  */
141
  $this->_try_load_site_options();
142
 
 
 
 
 
 
 
 
 
 
143
  }
144
 
145
  /**
104
  }
105
  else {
106
  ! defined( 'LSCWP_CUR_V' ) && define( 'LSCWP_CUR_V', $ver );
 
107
 
108
+ /**
109
+ * Upgrade conf
110
+ */
111
+ if ( $ver != Core::VER ) {
112
+ // Plugin version will be set inside
113
+ // Site plugin upgrade & version change will do in load_site_conf
114
+ Data::get_instance()->conf_upgrade( $ver );
115
+ }
116
  }
117
 
118
  /**
140
  */
141
  $this->_try_load_site_options();
142
 
143
+ // Activation delayed file update
144
+ if ( self::get_option( '__activation' ) ) {
145
+ // Check new version @since 2.9.3
146
+ Cloud::version_check( 'activate' . ( defined( 'LSCWP_REF' ) ? '_' . LSCWP_REF : '' ) );
147
+
148
+ $this->update_confs(); // Files only get corrected in activation or saving settings actions.
149
+
150
+ self::delete_option( '__activation' );
151
+ }
152
  }
153
 
154
  /**