From 8f641c0523c45c324a4efaa227f99f52b883d619 Mon Sep 17 00:00:00 2001 From: Erik Torsner Date: Mon, 4 Apr 2022 13:06:23 +0200 Subject: [PATCH] Deploying version 2.6.2 --- README.md | 5 +- classes/amazon-s3-and-cloudfront.php | 4 +- classes/items/download-handler.php | 21 ++- classes/items/item.php | 41 ++++- .../upgrades/fix-broken-item-extra-data.php | 74 +++++++++ classes/upgrades/upgrade-item-extra-data.php | 7 +- languages/amazon-s3-and-cloudfront-en.pot | 143 +++++++++--------- readme.txt | 5 +- wordpress-s3.php | 4 +- 9 files changed, 218 insertions(+), 86 deletions(-) create mode 100644 classes/upgrades/fix-broken-item-extra-data.php diff --git a/README.md b/README.md index ee9a2e32..86d3b778 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ **Requires at least:** 4.9 **Tested up to:** 5.9 **Requires PHP:** 5.6 -**Stable tag:** 2.6.1 +**Stable tag:** 2.6.2 **License:** GPLv3 Copies files to Amazon S3, DigitalOcean Spaces or Google Cloud Storage as they are uploaded to the Media Library. Optionally configure Amazon CloudFront or another CDN for faster delivery. @@ -93,6 +93,9 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin ## Changelog ## +### WP Offload Media Lite 2.6.2 - 2022-04-04 ### +* Bug fix: Upgrade routine no longer risks breaking items when external object cache is in use + ### WP Offload Media Lite 2.6.1 - 2022-03-21 ### * Bug fix: Local files are no longer removed if as3cf_pre_upload_attachment filter is used to abort upload diff --git a/classes/amazon-s3-and-cloudfront.php b/classes/amazon-s3-and-cloudfront.php index b7bfe9c4..56bde038 100644 --- a/classes/amazon-s3-and-cloudfront.php +++ b/classes/amazon-s3-and-cloudfront.php @@ -27,6 +27,7 @@ use DeliciousBrains\WP_Offload_Media\Providers\Storage\Null_Provider; use DeliciousBrains\WP_Offload_Media\Providers\Storage\Storage_Provider; use DeliciousBrains\WP_Offload_Media\Upgrades\Clear_Postmeta_Cache; +use DeliciousBrains\WP_Offload_Media\Upgrades\Fix_Broken_Item_Extra_Data; use DeliciousBrains\WP_Offload_Media\Upgrades\Upgrade; use DeliciousBrains\WP_Offload_Media\Upgrades\Upgrade_Content_Replace_URLs; use DeliciousBrains\WP_Offload_Media\Upgrades\Upgrade_EDD_Replace_URLs; @@ -167,7 +168,7 @@ class Amazon_S3_And_CloudFront extends AS3CF_Plugin_Base { */ protected $integration_manager; - const LATEST_UPGRADE_ROUTINE = 11; + const LATEST_UPGRADE_ROUTINE = 12; /** * @param string $plugin_file_path @@ -233,6 +234,7 @@ public function init( $plugin_file_path ) { new Upgrade_Tools_Errors( $this ); new Upgrade_Item_Extra_Data( $this ); new Clear_Postmeta_Cache( $this ); + new Fix_Broken_Item_Extra_Data( $this ); // Plugin setup add_action( 'admin_menu', array( $this, 'admin_menu' ) ); diff --git a/classes/items/download-handler.php b/classes/items/download-handler.php index 9d02d5b4..c0b08a52 100644 --- a/classes/items/download-handler.php +++ b/classes/items/download-handler.php @@ -116,18 +116,23 @@ protected function handle_item( Item $as3cf_item, Manifest $manifest, array $opt * @return bool|WP_Error */ protected function post_handle( Item $as3cf_item, Manifest $manifest, array $options ) { - // Look for errors - $errors = new WP_Error; - $i = 1; + $error_count = 0; foreach ( $manifest->objects as $manifest_object ) { - if ( $manifest_object['download_result']['status'] !== self::STATUS_OK ) { - $errors->add( 'download-error-' . $i++, $manifest_object['download_result']['message'] ); + if ( self::STATUS_OK !== $manifest_object['download_result']['status'] ) { + $error_count++; } } - if ( count( $errors->get_error_codes() ) ) { - return $errors; + if ( $error_count > 0 ) { + $error_message = sprintf( + __( 'There were %1$d errors downloading files for %2$s ID %3$d from bucket', 'amazon-s3-and-cloudfront' ), + $error_count, + $this->as3cf->get_source_type_name( $as3cf_item->source_type() ), + $as3cf_item->source_id() + ); + + return new WP_Error( 'download-error', $error_message ); } $as3cf_item->update_filesize_after_download_local(); @@ -166,4 +171,4 @@ private function download_object( $provider_client, $object ) { return true; } -} \ No newline at end of file +} diff --git a/classes/items/item.php b/classes/items/item.php index 6f9d3aa2..a737ae8e 100644 --- a/classes/items/item.php +++ b/classes/items/item.php @@ -40,6 +40,7 @@ abstract class Item { ); private static $checked_table_exists = array(); + private static $enable_cache = true; private $id; private $provider; @@ -179,6 +180,20 @@ public static function primary_object_key() { return '__as3cf_primary'; } + /** + * Enable the built-in Item cache. + */ + public static function enable_cache() { + self::$enable_cache = true; + } + + /** + * Disable the built-in Item cache. + */ + public static function disable_cache() { + self::$enable_cache = false; + } + /** * Returns the string used to group all keys in the object cache by. * @@ -389,6 +404,10 @@ protected static function remove_from_items_cache( $item ) { * @return bool|Item */ private static function get_from_items_cache_by_id( $id ) { + if ( false === self::$enable_cache ) { + return false; + } + $blog_id = get_current_blog_id(); if ( ! empty( static::$items_cache_by_id[ $blog_id ][ $id ] ) ) { @@ -414,6 +433,10 @@ private static function get_from_items_cache_by_id( $id ) { * @return bool|Item */ private static function get_from_items_cache_by_source_id( $source_id ) { + if ( false === self::$enable_cache ) { + return false; + } + $blog_id = get_current_blog_id(); if ( ! empty( static::$items_cache_by_source_id[ $blog_id ][ static::$source_type ][ $source_id ] ) ) { @@ -440,6 +463,10 @@ private static function get_from_items_cache_by_source_id( $source_id ) { * @return bool|Item */ private static function get_from_items_cache_by_bucket_and_path( $bucket, $path ) { + if ( false === self::$enable_cache ) { + return false; + } + $blog_id = get_current_blog_id(); if ( ! empty( static::$items_cache_by_path[ $blog_id ][ static::$source_type ][ $path ] ) ) { @@ -1896,7 +1923,7 @@ public function remove_duplicate_paths( Item $as3cf_item, $paths ) { */ protected static function maybe_update_extra_info( &$extra_info, $source_id, $is_private ) { if ( ! is_array( $extra_info ) ) { - return; + $extra_info = array(); } // Compatibility fallback for if just an array of private sizes is supplied. @@ -1905,6 +1932,16 @@ protected static function maybe_update_extra_info( &$extra_info, $source_id, $is $private_sizes = $extra_info; } + // Compatibility fallback for old broken format. + if ( isset( $extra_info['private_sizes'] ) && isset( $extra_info['private_sizes']['private_sizes'] ) ) { + $extra_info['private_sizes'] = $extra_info['private_sizes']['private_sizes']; + } + + // Extra info must have at least one element, if not it's broken. + if ( isset( $extra_info['objects'] ) && 0 === count( $extra_info['objects'] ) ) { + unset( $extra_info['objects'] ); + } + if ( ! isset( $extra_info['objects'] ) ) { $private_sizes = isset( $extra_info['private_sizes'] ) && is_array( $extra_info['private_sizes'] ) ? $extra_info['private_sizes'] : $private_sizes; $extra_info['objects'] = array(); @@ -1986,4 +2023,4 @@ public static function is_empty_item_source( $item_source ) { return false; } -} \ No newline at end of file +} diff --git a/classes/upgrades/fix-broken-item-extra-data.php b/classes/upgrades/fix-broken-item-extra-data.php new file mode 100644 index 00000000..5ce23e6a --- /dev/null +++ b/classes/upgrades/fix-broken-item-extra-data.php @@ -0,0 +1,74 @@ +get_var( $sql ); + } + + $sql = 'SELECT source_id' . $sql; + $sql .= ' ORDER BY id'; + + if ( $limit && $limit > 0 ) { + $sql .= sprintf( ' LIMIT %d', (int) $limit ); + } + + return $wpdb->get_results( $sql, OBJECT ); + } +} diff --git a/classes/upgrades/upgrade-item-extra-data.php b/classes/upgrades/upgrade-item-extra-data.php index f18ecffb..098a5781 100644 --- a/classes/upgrades/upgrade-item-extra-data.php +++ b/classes/upgrades/upgrade-item-extra-data.php @@ -14,6 +14,7 @@ use AS3CF_Error; use DeliciousBrains\WP_Offload_Media\Items\Item; use DeliciousBrains\WP_Offload_Media\Items\Media_Library_Item; +use stdClass; /** * Upgrade_Item_Extra_Data Class @@ -51,12 +52,14 @@ protected function get_running_update_text() { /** * Update extra_info in items table * - * @param $item + * @param stdClass $item * * @return bool */ protected function upgrade_item( $item ) { + Item::disable_cache(); $as3cf_item = Media_Library_Item::get_by_source_id( $item->source_id ); + Item::enable_cache(); if ( ! $as3cf_item ) { AS3CF_Error::log( 'Could not construct item for attachment with ID ' . $item->source_id . '.' ); @@ -149,4 +152,4 @@ protected function get_items_with_old_extra_info( $prefix, $count = false, $limi return $wpdb->get_results( $sql, OBJECT ); } -} \ No newline at end of file +} diff --git a/languages/amazon-s3-and-cloudfront-en.pot b/languages/amazon-s3-and-cloudfront-en.pot index 7e4a6242..6f82dc5e 100644 --- a/languages/amazon-s3-and-cloudfront-en.pot +++ b/languages/amazon-s3-and-cloudfront-en.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: amazon-s3-and-cloudfront\n" "Report-Msgid-Bugs-To: nom@deliciousbrains.com\n" -"POT-Creation-Date: 2022-03-21 15:00+0000\n" +"POT-Creation-Date: 2022-04-04 12:34+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,17 +17,17 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: classes/amazon-s3-and-cloudfront.php:196 #: classes/amazon-s3-and-cloudfront.php:197 +#: classes/amazon-s3-and-cloudfront.php:198 msgid "Offload Media Lite" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:438 -#: classes/amazon-s3-and-cloudfront.php:455 +#: classes/amazon-s3-and-cloudfront.php:440 +#: classes/amazon-s3-and-cloudfront.php:457 msgid "Unknown" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:536 +#: classes/amazon-s3-and-cloudfront.php:538 #: view/bucket-select.php:87 #: view/delivery-provider-select.php:129 #: view/delivery-provider-select.php:149 @@ -38,185 +38,185 @@ msgstr "" msgid "defined in wp-config.php" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:1523 +#: classes/amazon-s3-and-cloudfront.php:1525 msgid "This action can only be performed through an admin screen." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:1525 +#: classes/amazon-s3-and-cloudfront.php:1527 msgid "Cheatin’ eh?" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:1527 +#: classes/amazon-s3-and-cloudfront.php:1529 msgid "You do not have sufficient permissions to access this page." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:1851 +#: classes/amazon-s3-and-cloudfront.php:1853 msgid "Error Getting Bucket Region" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:1852 +#: classes/amazon-s3-and-cloudfront.php:1854 #, php-format msgid "There was an error attempting to get the region of the bucket %s: %s" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:1955 +#: classes/amazon-s3-and-cloudfront.php:1957 msgid "" "This is a test file to check if the user has write permission to the bucket. " "Delete me if found." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:1961 +#: classes/amazon-s3-and-cloudfront.php:1963 #, php-format msgid "" "There was an error attempting to check the permissions of the bucket %s: %s" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2079 +#: classes/amazon-s3-and-cloudfront.php:2081 msgid "Error creating bucket" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2080 +#: classes/amazon-s3-and-cloudfront.php:2082 msgid "Bucket name too short." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2081 +#: classes/amazon-s3-and-cloudfront.php:2083 msgid "Bucket name too long." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2082 +#: classes/amazon-s3-and-cloudfront.php:2084 msgid "" "Invalid character. Bucket names can contain lowercase letters, numbers, " "periods and hyphens." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2083 +#: classes/amazon-s3-and-cloudfront.php:2085 msgid "Error saving bucket" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2084 +#: classes/amazon-s3-and-cloudfront.php:2086 msgid "Error fetching buckets" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2085 +#: classes/amazon-s3-and-cloudfront.php:2087 msgid "Error getting URL preview: " msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2086 +#: classes/amazon-s3-and-cloudfront.php:2088 msgid "The changes you made will be lost if you navigate away from this page" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2087 +#: classes/amazon-s3-and-cloudfront.php:2089 msgid "Getting diagnostic info..." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2088 +#: classes/amazon-s3-and-cloudfront.php:2090 msgid "Error getting diagnostic info: " msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2089 +#: classes/amazon-s3-and-cloudfront.php:2091 msgctxt "placeholder for hidden access key, 39 char max" msgid "-- not shown --" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2091 -#: classes/amazon-s3-and-cloudfront.php:4212 +#: classes/amazon-s3-and-cloudfront.php:2093 +#: classes/amazon-s3-and-cloudfront.php:4214 msgid "Settings saved." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2213 +#: classes/amazon-s3-and-cloudfront.php:2215 msgid "Cheatin' eh?" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2286 +#: classes/amazon-s3-and-cloudfront.php:2288 #, php-format msgid "Could not set new Delivery Provider: %s" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2361 -#: classes/amazon-s3-and-cloudfront.php:2491 +#: classes/amazon-s3-and-cloudfront.php:2363 +#: classes/amazon-s3-and-cloudfront.php:2493 msgid "No bucket name provided." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2370 +#: classes/amazon-s3-and-cloudfront.php:2372 msgid "Bucket name not valid." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2383 +#: classes/amazon-s3-and-cloudfront.php:2385 msgid "No region provided." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2460 +#: classes/amazon-s3-and-cloudfront.php:2462 #, php-format msgctxt "Trying to change public access setting for given provider's bucket." msgid "Can't change Block All Public Access setting for %s buckets." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2469 +#: classes/amazon-s3-and-cloudfront.php:2471 msgid "No block public access setting provided." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2482 +#: classes/amazon-s3-and-cloudfront.php:2484 msgid "Storage Provider not configured with access credentials." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2509 +#: classes/amazon-s3-and-cloudfront.php:2511 msgid "Could not change Block All Public Access status for bucket." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2526 +#: classes/amazon-s3-and-cloudfront.php:2528 msgid "" "Failed to Enable Block All Public Access — We could " "not enable Block All Public Access. You will need to log in to the AWS " "Console and do it manually." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2528 +#: classes/amazon-s3-and-cloudfront.php:2530 msgid "" "Failed to Disable Block All Public Access — We could " "not disable Block All Public Access. You will need to log in to the AWS " "Console and do it manually." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2563 +#: classes/amazon-s3-and-cloudfront.php:2565 #: view/provider-select.php:329 msgctxt "placeholder for hidden secret access key, 39 char max" msgid "-- not shown --" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2586 +#: classes/amazon-s3-and-cloudfront.php:2588 msgid "Key File not valid JSON." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2606 -#: classes/amazon-s3-and-cloudfront.php:2620 -#: classes/amazon-s3-and-cloudfront.php:2629 +#: classes/amazon-s3-and-cloudfront.php:2608 +#: classes/amazon-s3-and-cloudfront.php:2622 +#: classes/amazon-s3-and-cloudfront.php:2631 msgctxt "missing form field" msgid " not provided." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2672 +#: classes/amazon-s3-and-cloudfront.php:2674 msgctxt "Show the media library tab" msgid "Media Library" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2673 +#: classes/amazon-s3-and-cloudfront.php:2675 msgctxt "Show the addons tab" msgid "Addons" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2674 +#: classes/amazon-s3-and-cloudfront.php:2676 msgctxt "Show the support tab" msgid "Support" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2851 +#: classes/amazon-s3-and-cloudfront.php:2853 #, php-format msgid "" "WP Offload Media — The file %s has been given %s " "permissions in the bucket." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2870 +#: classes/amazon-s3-and-cloudfront.php:2872 msgid "" "WP Offload Media Requirement Missing — Looks like you " "don't have an image manipulation library installed on this server and " @@ -224,7 +224,7 @@ msgid "" "Please setup GD or ImageMagick." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:2894 +#: classes/amazon-s3-and-cloudfront.php:2896 #, php-format msgid "" "Missing Table — One or more required database tables " @@ -232,18 +232,18 @@ msgid "" "details. %s" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:3716 +#: classes/amazon-s3-and-cloudfront.php:3718 #, php-format msgid "" "Define your access keys to enable write access to the " "bucket" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:3723 +#: classes/amazon-s3-and-cloudfront.php:3725 msgid "Quick Start Guide" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:3725 +#: classes/amazon-s3-and-cloudfront.php:3727 #, php-format msgid "" "Looks like we don't have write access to this bucket. It's likely that the " @@ -252,7 +252,7 @@ msgid "" "correctly." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:3727 +#: classes/amazon-s3-and-cloudfront.php:3729 #, php-format msgid "" "Looks like we don't have access to the buckets. It's likely that the user " @@ -260,39 +260,39 @@ msgid "" "Please see our %s for instructions on setting up permissions correctly." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:3897 +#: classes/amazon-s3-and-cloudfront.php:3899 msgid "WP Offload Media Activation" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:3898 +#: classes/amazon-s3-and-cloudfront.php:3900 msgid "" "WP Offload Media Lite and WP Offload Media cannot both be active. We've " "automatically deactivated WP Offload Media Lite." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:3900 +#: classes/amazon-s3-and-cloudfront.php:3902 msgid "WP Offload Media Lite Activation" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:3901 +#: classes/amazon-s3-and-cloudfront.php:3903 msgid "" "WP Offload Media Lite and WP Offload Media cannot both be active. We've " "automatically deactivated WP Offload Media." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:3955 +#: classes/amazon-s3-and-cloudfront.php:3957 msgid "More info »" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:4024 +#: classes/amazon-s3-and-cloudfront.php:4026 msgid "this doc" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:4026 +#: classes/amazon-s3-and-cloudfront.php:4028 msgid "WP Offload Media Feature Removed" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:4027 +#: classes/amazon-s3-and-cloudfront.php:4029 #, php-format msgid "" "You had the \"Always non-SSL\" option selected in your settings, but we've " @@ -303,21 +303,21 @@ msgid "" "to the old behavior." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:4175 +#: classes/amazon-s3-and-cloudfront.php:4177 msgid "Assets Pull" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:4176 +#: classes/amazon-s3-and-cloudfront.php:4178 msgid "" "An addon for WP Offload Media to serve your site's JS, CSS, and other " "enqueued assets from Amazon CloudFront or another CDN." msgstr "" -#: classes/amazon-s3-and-cloudfront.php:4180 +#: classes/amazon-s3-and-cloudfront.php:4182 msgid "Feature" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:4226 +#: classes/amazon-s3-and-cloudfront.php:4228 #, php-format msgid "" "Amazon Web Services Plugin No Longer Required — As of " @@ -328,7 +328,7 @@ msgid "" "plugin, it should be safe to deactivate and delete it. %2$s" msgstr "" -#: classes/amazon-s3-and-cloudfront.php:4258 +#: classes/amazon-s3-and-cloudfront.php:4260 #, php-format msgid "" "WP Offload Media Settings Moved — You now define your " @@ -526,18 +526,23 @@ msgid "" "configured" msgstr "" -#: classes/items/download-handler.php:150 +#: classes/items/download-handler.php:129 +#, php-format +msgid "There were %1$d errors downloading files for %2$s ID %3$d from bucket" +msgstr "" + +#: classes/items/download-handler.php:155 #, php-format msgid "The local directory %s does not exist and could not be created." msgstr "" -#: classes/items/download-handler.php:151 +#: classes/items/download-handler.php:156 #, php-format msgid "" "There was an error attempting to download the file %1$s from the bucket: %2$s" msgstr "" -#: classes/items/download-handler.php:162 +#: classes/items/download-handler.php:167 #, php-format msgid "Error downloading %1$s from bucket: %2$s" msgstr "" @@ -747,7 +752,7 @@ msgid "" "make it run faster." msgstr "" -#: classes/upgrades/upgrade-item-extra-data.php:48 +#: classes/upgrades/upgrade-item-extra-data.php:49 msgid "and updating metadata about offloaded items to new format." msgstr "" diff --git a/readme.txt b/readme.txt index f0cada0c..1ae3206e 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: uploads, amazon, s3, amazon s3, digitalocean, digitalocean spaces, google Requires at least: 4.9 Tested up to: 5.9 Requires PHP: 5.6 -Stable tag: 2.6.1 +Stable tag: 2.6.2 License: GPLv3 Copies files to Amazon S3, DigitalOcean Spaces or Google Cloud Storage as they are uploaded to the Media Library. Optionally configure Amazon CloudFront or another CDN for faster delivery. @@ -85,6 +85,9 @@ This version requires PHP 5.3.3+ and the Amazon Web Services plugin == Changelog == += WP Offload Media Lite 2.6.2 - 2022-04-04 = +* Bug fix: Upgrade routine no longer risks breaking items when external object cache is in use + = WP Offload Media Lite 2.6.1 - 2022-03-21 = * Bug fix: Local files are no longer removed if as3cf_pre_upload_attachment filter is used to abort upload diff --git a/wordpress-s3.php b/wordpress-s3.php index 4be293f7..ca52b446 100644 --- a/wordpress-s3.php +++ b/wordpress-s3.php @@ -4,7 +4,7 @@ Plugin URI: http://wordpress.org/extend/plugins/amazon-s3-and-cloudfront/ Description: Automatically copies media uploads to Amazon S3, DigitalOcean Spaces or Google Cloud Storage for storage and delivery. Optionally configure Amazon CloudFront or another CDN for even faster delivery. Author: Delicious Brains -Version: 2.6.1 +Version: 2.6.2 Author URI: https://deliciousbrains.com/?utm_campaign=WP%2BOffload%2BS3&utm_source=wordpress.org&utm_medium=free%2Bplugin%2Blisting Network: True Text Domain: amazon-s3-and-cloudfront @@ -26,7 +26,7 @@ // Then completely rewritten. */ -$GLOBALS['aws_meta']['amazon-s3-and-cloudfront']['version'] = '2.6.1'; +$GLOBALS['aws_meta']['amazon-s3-and-cloudfront']['version'] = '2.6.2'; require_once dirname( __FILE__ ) . '/classes/as3cf-compatibility-check.php';