diff --git a/litespeed-cache.php b/litespeed-cache.php
index 23365368e..3b0a432c5 100644
--- a/litespeed-cache.php
+++ b/litespeed-cache.php
@@ -4,7 +4,7 @@
* Plugin Name: LiteSpeed Cache
* Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
* Description: High-performance page caching and site optimization from LiteSpeed
- * Version: 7.0-b25
+ * Version: 7.0-b26
* Author: LiteSpeed Technologies
* Author URI: https://www.litespeedtech.com
* License: GPLv3
@@ -34,7 +34,7 @@
return;
}
-!defined('LSCWP_V') && define('LSCWP_V', '7.0-b25');
+!defined('LSCWP_V') && define('LSCWP_V', '7.0-b26');
!defined('LSCWP_CONTENT_DIR') && define('LSCWP_CONTENT_DIR', WP_CONTENT_DIR);
!defined('LSCWP_DIR') && define('LSCWP_DIR', __DIR__ . '/'); // Full absolute path '/var/www/html/***/wp-content/plugins/litespeed-cache/' or MU
diff --git a/readme.txt b/readme.txt
index 00b466822..71560da44 100644
--- a/readme.txt
+++ b/readme.txt
@@ -265,6 +265,7 @@ You can report security bugs through the Patchstack Vulnerability Disclosure Pro
* **Cloud** Supported `list_preferred` in online service node detection.
* **Cloud** Fixed an error domain expiry removal PHP warning. (cheekymate06)
* **Config** Improved QUIC.cloud CDN config to auto turn ON after activiated online service.
+* **Config** Dropped ver info when comparing md5 to decide if sync conf or not in plugin upgrade process.
* **Database Optimize** Fixed Autoload summary for WP6.6+. (Mukesh Panchal/Viktor Szépe)
* **CLI** New QUIC.cloud CDN CLI `wp litespeed-online cdn_init --ssl-cert=xxx.pem --ssl-key=xxx -method=cname|ns|cfi`.
* **CLI** New QUIC.cloud CDN CLI `wp litespeed-online link --email=xxx@example.com --api-key=xxxx`.
diff --git a/src/base.cls.php b/src/base.cls.php
index 2961cc7a0..684587888 100644
--- a/src/base.cls.php
+++ b/src/base.cls.php
@@ -327,6 +327,7 @@ class Base extends Root
protected static $_default_options = array(
self::_VER => '',
self::HASH => '',
+ self::O_API_KEY => '',
self::O_AUTO_UPGRADE => false,
self::O_SERVER_IP => '',
self::O_GUEST => false,
diff --git a/src/cdn/quic.cls.php b/src/cdn/quic.cls.php
index 71ec48234..bd8aa2428 100644
--- a/src/cdn/quic.cls.php
+++ b/src/cdn/quic.cls.php
@@ -57,6 +57,8 @@ public function try_sync_conf($force = false)
}
}
unset($options[self::O_MEDIA_LQIP_EXC]);
+ unset($options[self::O_API_KEY]);
+ unset($options[self::_VER]);
// Remove overflow multi lines fields
foreach ($options as $k => $v) {
diff --git a/src/cloud.cls.php b/src/cloud.cls.php
index 102ea2389..bc33d4744 100644
--- a/src/cloud.cls.php
+++ b/src/cloud.cls.php
@@ -1205,7 +1205,7 @@ private function _maybe_cloud($service_tag)
}
if ($service_tag == self::SVC_D_SYNC_CONF && !$this->activated()) {
- self::debug('Skip sync conf if API key is not available yet.');
+ self::debug('Skip sync conf as QC not activated yet.');
return false;
}
diff --git a/src/data.cls.php b/src/data.cls.php
index c168259f7..2f502e2e6 100644
--- a/src/data.cls.php
+++ b/src/data.cls.php
@@ -15,7 +15,7 @@
class Data extends Root
{
- const LOG_TAG = '[Data]';
+ const LOG_TAG = '🚀';
private $_db_updater = array(
'3.5.0.3' => array('litespeed_update_3_5'),
@@ -24,7 +24,7 @@ class Data extends Root
'4.3' => array('litespeed_update_4_3'),
'4.4.4-b1' => array('litespeed_update_4_4_4'),
'5.3-a5' => array('litespeed_update_5_3'),
- '7.0-b25' => array('litespeed_update_7'),
+ '7.0-b26' => array('litespeed_update_7'),
);
private $_db_site_updater = array(
@@ -120,7 +120,7 @@ public function conf_upgrade($ver)
if (version_compare($ver, $k, '<')) {
// run each callback
foreach ($v as $v2) {
- Debug2::debug("[Data] Updating [ori_v] $ver \t[to] $k \t[func] $v2");
+ self::debug("Updating [ori_v] $ver \t[to] $k \t[func] $v2");
call_user_func($v2);
}
}
@@ -138,7 +138,7 @@ public function conf_upgrade($ver)
Conf::delete_option(Base::_VER);
Conf::add_option(Base::_VER, Core::VER);
- Debug2::debug('[Data] Updated version to ' . Core::VER);
+ self::debug('Updated version to ' . Core::VER);
$this->_set_upgrade_lock(false);
@@ -170,7 +170,7 @@ public function conf_site_upgrade($ver)
if (version_compare($ver, $k, '<')) {
// run each callback
foreach ($v as $v2) {
- Debug2::debug("[Data] Updating site [ori_v] $ver \t[to] $k \t[func] $v2");
+ self::debug("Updating site [ori_v] $ver \t[to] $k \t[func] $v2");
call_user_func($v2);
}
}
@@ -182,7 +182,7 @@ public function conf_site_upgrade($ver)
Conf::delete_site_option(Base::_VER);
Conf::add_site_option(Base::_VER, Core::VER);
- Debug2::debug('[Data] Updated site_version to ' . Core::VER);
+ self::debug('Updated site_version to ' . Core::VER);
$this->_set_upgrade_lock(false);
@@ -267,7 +267,7 @@ public function try_upgrade_conf_3_0()
if ($this->conf(Base::O_DEBUG)) {
$this->cls('Debug2')->init();
}
- Debug2::debug('[Data] Upgrading previous settings [from] ' . $ver . ' [to] v3.0');
+ self::debug('Upgrading previous settings [from] ' . $ver . ' [to] v3.0');
if ($this->_get_upgrade_lock()) {
return;
@@ -282,7 +282,7 @@ public function try_upgrade_conf_3_0()
$this->_set_upgrade_lock(false);
- Debug2::debug('[Data] Upgraded to v3.0');
+ self::debug('Upgraded to v3.0');
// Upgrade from 3.0 to latest version
$ver = '3.0';
@@ -378,15 +378,15 @@ public function tb_create($tb)
{
global $wpdb;
- Debug2::debug2('[Data] Checking table ' . $tb);
+ self::debug2('[Data] Checking table ' . $tb);
// Check if table exists first
if ($this->tb_exist($tb)) {
- Debug2::debug2('[Data] Existed');
+ self::debug2('[Data] Existed');
return;
}
- Debug2::debug('[Data] Creating ' . $tb);
+ self::debug('Creating ' . $tb);
$sql = sprintf(
'CREATE TABLE IF NOT EXISTS `%1$s` (' . $this->_tb_structure($tb) . ') %2$s;',
@@ -396,7 +396,7 @@ public function tb_create($tb)
$res = $wpdb->query($sql);
if ($res !== true) {
- Debug2::debug('[Data] Warning! Creating table failed!', $sql);
+ self::debug('Warning! Creating table failed!', $sql);
Admin_Display::error(Error::msg('failed_tb_creation', array('' . $tb . '
', '' . $sql . '
')));
}
}
@@ -415,7 +415,7 @@ public function tb_del($tb)
return;
}
- Debug2::debug('[Data] Deleting table ' . $tb);
+ self::debug('Deleting table ' . $tb);
$q = 'DROP TABLE IF EXISTS ' . $this->tb($tb);
$wpdb->query($q);
@@ -545,7 +545,7 @@ public function save_url($request_url, $vary, $file_type, $filecon_md5, $path, $
$file_to_del = $path . '/' . $v['filename'] . '.' . ($file_type == 'js' ? 'js' : 'css');
if (file_exists($file_to_del)) {
// Safe to delete
- Debug2::debug('[Data] Delete expired unused file: ' . $file_to_del);
+ self::debug('Delete expired unused file: ' . $file_to_del);
// Clear related lscache first to avoid cache copy of same URL w/ diff QS
// Purge::add( Tag::TYPE_MIN . '.' . $file_row[ 'filename' ] . '.' . $file_type );
@@ -606,14 +606,14 @@ public function mark_as_expired($request_url, $auto_q = false)
global $wpdb;
$tb_url = $this->tb('url');
- Debug2::debug('[Data] Try to mark as expired: ' . $request_url);
+ self::debug('Try to mark as expired: ' . $request_url);
$q = "SELECT * FROM `$tb_url` WHERE url=%s";
$url_row = $wpdb->get_row($wpdb->prepare($q, $request_url), ARRAY_A);
if (!$url_row) {
return;
}
- Debug2::debug('[Data] Mark url_id=' . $url_row['id'] . ' as expired');
+ self::debug('Mark url_id=' . $url_row['id'] . ' as expired');
$tb_url_file = $this->tb('url_file');
diff --git a/src/data.upgrade.func.php b/src/data.upgrade.func.php
index f9ad296ce..83592c278 100644
--- a/src/data.upgrade.func.php
+++ b/src/data.upgrade.func.php
@@ -21,7 +21,6 @@
*/
function litespeed_update_7()
{
- global $wpdb;
Debug2::debug('[Data] v7 upgrade started');
$__cloud = Cloud::cls();
@@ -33,7 +32,6 @@ function litespeed_update_7()
}
$new_prepared = $__cloud->init_qc_prepare();
- $cloud_summary = Cloud::get_summary();
if (!$new_prepared && $__cloud->activated()) {
Debug2::debug('[Data] QC previously activated in v7, bypassed migration');
return;