golden hour
/home/godaofbq/cellsonic-usa.com/wp-content/plugins/litespeed-cache/src
⬆️ Go Up
Upload
File/Folder
Size
Actions
activation.cls.php
17.62 KB
Del
OK
admin-display.cls.php
48.76 KB
Del
OK
admin-settings.cls.php
12.77 KB
Del
OK
admin.cls.php
6.13 KB
Del
OK
api.cls.php
10.44 KB
Del
OK
avatar.cls.php
9.25 KB
Del
OK
base.cls.php
37.66 KB
Del
OK
cdn
-
Del
OK
cdn.cls.php
17.76 KB
Del
OK
cloud-auth-callback.trait.php
10.43 KB
Del
OK
cloud-auth-ip.trait.php
4.33 KB
Del
OK
cloud-auth.trait.php
9.38 KB
Del
OK
cloud-misc.trait.php
10.32 KB
Del
OK
cloud-node.trait.php
5.95 KB
Del
OK
cloud-queue-svc.cls.php
9.33 KB
Del
OK
cloud-request.trait.php
19.68 KB
Del
OK
cloud.cls.php
7.32 KB
Del
OK
conf.cls.php
19.53 KB
Del
OK
control.cls.php
24.35 KB
Del
OK
core.cls.php
21.53 KB
Del
OK
crawler-map.cls.php
22.3 KB
Del
OK
crawler.cls.php
44 KB
Del
OK
css.cls.php
7.26 KB
Del
OK
data.cls.php
22.2 KB
Del
OK
data.upgrade.func.php
6.41 KB
Del
OK
data_structure
-
Del
OK
db-optm.cls.php
15.35 KB
Del
OK
debug2.cls.php
18.4 KB
Del
OK
doc.cls.php
5.45 KB
Del
OK
error.cls.php
7.35 KB
Del
OK
esi.cls.php
31.37 KB
Del
OK
file.cls.php
13.75 KB
Del
OK
guest.cls.php
2.75 KB
Del
OK
gui.cls.php
35.09 KB
Del
OK
health.cls.php
4.66 KB
Del
OK
htaccess.cls.php
29.81 KB
Del
OK
img-optm-manage.trait.php
31.25 KB
Del
OK
img-optm-pull.trait.php
22.1 KB
Del
OK
img-optm-send.trait.php
20.77 KB
Del
OK
img-optm.cls.php
5.25 KB
Del
OK
import.cls.php
4.29 KB
Del
OK
import.preset.cls.php
5.5 KB
Del
OK
lang.cls.php
17.02 KB
Del
OK
localization.cls.php
4.03 KB
Del
OK
media.cls.php
44.06 KB
Del
OK
metabox.cls.php
5.29 KB
Del
OK
object-cache-wp.cls.php
18.82 KB
Del
OK
object-cache.cls.php
21.82 KB
Del
OK
object.lib.php
13.85 KB
Del
OK
optimax.cls.php
8.94 KB
Del
OK
optimize.cls.php
38.74 KB
Del
OK
optimizer.cls.php
12.71 KB
Del
OK
placeholder.cls.php
17.64 KB
Del
OK
purge.cls.php
35.48 KB
Del
OK
report.cls.php
7.53 KB
Del
OK
rest.cls.php
7.95 KB
Del
OK
root.cls.php
14.29 KB
Del
OK
router.cls.php
20.86 KB
Del
OK
str.cls.php
3.08 KB
Del
OK
tag.cls.php
9.26 KB
Del
OK
task.cls.php
8.98 KB
Del
OK
tool.cls.php
4.58 KB
Del
OK
ucss.cls.php
7.34 KB
Del
OK
utility.cls.php
27.11 KB
Del
OK
vary.cls.php
21.33 KB
Del
OK
vpi.cls.php
4.25 KB
Del
OK
Edit: data.upgrade.func.php
<?php /** * Database upgrade funcs * * NOTE: whenever called this file, always call Data::get_upgrade_lock and Data::_set_upgrade_lock first. * * @package LiteSpeed * @since 3.0 */ defined( 'WPINC' ) || exit(); use LiteSpeed\Debug2; use LiteSpeed\Cloud; use LiteSpeed\Conf; /** * Check whether a DB table exists. * * @since 7.2 * * @param string $table_name Fully-qualified table name. * @return bool */ function litespeed_table_exists( $table_name ) { global $wpdb; $save_state = $wpdb->suppress_errors; $wpdb->suppress_errors( true ); // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.UnquotedComplexPlaceholder, WordPress.DB.DirectDatabaseQuery.DirectQuery $tb_exists = $wpdb->get_var( $wpdb->prepare( 'DESCRIBE `%1s`', $table_name ) ); $wpdb->suppress_errors( $save_state ); return null !== $tb_exists; } /** * Migrate v7.0- url_files URL from no trailing slash to trailing slash. * * @since 7.0.1 * @return void */ function litespeed_update_7_0_1() { global $wpdb; Debug2::debug( '[Data] v7.0.1 upgrade started' ); $tb_url = $wpdb->prefix . 'litespeed_url'; if ( ! litespeed_table_exists( $tb_url ) ) { Debug2::debug( '[Data] Table `litespeed_url` not found, bypassed migration' ); return; } // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery $list = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM `{$tb_url}` WHERE url LIKE %s", 'https://%/' ), ARRAY_A ); $existing_urls = array(); if ($list) { foreach ($list as $v) { $existing_urls[] = $v['url']; } } // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery $list = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM `{$tb_url}` WHERE url LIKE %s", 'https://%' ), ARRAY_A ); if ( ! $list ) { return; } foreach ( $list as $v ) { if ( '/' === substr( $v['url'], -1 ) ) { continue; } $new_url = $v['url'] . '/'; if ( in_array( $new_url, $existing_urls, true ) ) { continue; } // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery $wpdb->query( $wpdb->prepare( "UPDATE `{$tb_url}` SET url = %s WHERE id = %d", $new_url, $v['id'] ) ); } } /** * Migrate from domain key to pk/sk for QC * * @since 7.0 */ function litespeed_update_7() { Debug2::debug('[Data] v7 upgrade started'); $__cloud = Cloud::cls(); $domain_key = $__cloud->conf('api_key'); if (!$domain_key) { Debug2::debug('[Data] No domain key, bypassed migration'); return; } $new_prepared = $__cloud->init_qc_prepare(); if (!$new_prepared && $__cloud->activated()) { Debug2::debug('[Data] QC previously activated in v7, bypassed migration'); return; } $data = array( 'domain_key' => $domain_key, ); $resp = $__cloud->post(Cloud::SVC_D_V3UPGRADE, $data); if ( ! empty( $resp['qc_activated'] ) ) { if ( 'deleted' !== $resp['qc_activated'] ) { $cloud_summary_updates = array( 'qc_activated' => $resp['qc_activated'] ); if (!empty($resp['main_domain'])) { $cloud_summary_updates['main_domain'] = $resp['main_domain']; } Cloud::save_summary($cloud_summary_updates); Debug2::debug('[Data] Updated QC activated status to ' . $resp['qc_activated']); } } } /** * Drop deprecated guest_ips and guest_uas from DB options. * Migrate url table to make all links trailing slash for UCSS/CCSS. * * These values are now read from files instead. * * @since 7.7 */ function litespeed_update_7_7() { global $wpdb; Debug2::debug( '[Data] v7.7 upgrade: dropping guest_ips/guest_uas options' ); Conf::delete_option( 'conf.guest_ips' ); Conf::delete_option( 'conf.guest_uas' ); Conf::delete_site_option( 'conf.guest_ips' ); Conf::delete_site_option( 'conf.guest_uas' ); // Normalize all URLs to have trailing slash to match UCSS/CCSS generation logic Debug2::debug( '[Data] v7.7 upgrade: normalizing URL trailing slashes' ); // Skip if plain permalink mode (no trailing slash) $permalink_structure = get_option( 'permalink_structure' ); if ( empty( $permalink_structure ) ) { Debug2::debug( '[Data] Plain permalink mode, bypassed URL trailing slash migration' ); return; } $tb_url = $wpdb->prefix . 'litespeed_url'; if ( ! litespeed_table_exists( $tb_url ) ) { Debug2::debug( '[Data] Table `litespeed_url` not found, bypassed URL migration' ); return; } // Check if there are URLs without trailing slash (exclude URLs with query string) // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery $count = $wpdb->get_var( "SELECT COUNT(*) FROM `{$tb_url}` WHERE url LIKE 'https://%' AND url NOT LIKE '%/' AND url NOT LIKE '%?%'" ); if ( ! $count ) { Debug2::debug( '[Data] No URLs without trailing slash found, bypassed' ); return; } // Append trailing slash to all URLs that don't have one and don't have duplicate with slash (exclude URLs with query string) // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery $wpdb->query( "UPDATE `{$tb_url}` SET url = CONCAT(url, '/') WHERE url LIKE 'https://%' AND url NOT LIKE '%/' AND url NOT LIKE '%?%' AND CONCAT(url, '/') NOT IN (SELECT * FROM (SELECT url FROM `{$tb_url}` WHERE url LIKE '%/') AS tmp)" ); } /** * Append webp/mobile to url_file * * @since 5.3 */ function litespeed_update_5_3() { global $wpdb; Debug2::debug('[Data] Upgrade url_file table'); $tb = $wpdb->prefix . 'litespeed_url_file'; if ( litespeed_table_exists( $tb ) ) { $q = "ALTER TABLE `{$tb}` ADD COLUMN `mobile` tinyint(4) NOT NULL COMMENT 'mobile=1', ADD COLUMN `webp` tinyint(4) NOT NULL COMMENT 'webp=1' "; // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery $wpdb->query( $q ); } } /** * Drop the legacy img_optm table. [2026-07-02] * * The permanent img_optm table was replaced by the img_optming working queue + DB_SIZE postmeta + optimized-file existence checks. Fresh installs never created it; this migration removes the leftover table on upgraded sites. * * @since 7.9 */ function litespeed_update_7_9() { global $wpdb; Debug2::debug( '[Data] Drop legacy img_optm table' ); $tb = $wpdb->prefix . 'litespeed_img_optm'; if ( litespeed_table_exists( $tb ) ) { // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange $wpdb->query( "DROP TABLE IF EXISTS `{$tb}`" ); } }
Save