diff --git a/CHANGELOG.md b/CHANGELOG.md index a0f6ad73c0..45911d3199 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,16 @@ LifterLMS Changelog =================== +v5.4.1 - 2021-10-26 +------------------- + +##### Bug fixes + ++ Exclude internal-use-only properties (related to reporting caches and student counts) when exporting or cloning courses. [#1532](https://github.com/gocodebox/lifterlms/issues/1532) ++ Don't sanitize input from user forms until validation has succeeded. [#1829](https://github.com/gocodebox/lifterlms/issues/1829.) ++ Fixed an issue encountered when fields are removed from reusable blocks, causing some user forms from functioning as expected. [#1832](https://github.com/gocodebox/lifterlms/issues/1832) + + v5.4.0 - 2021-10-14 ------------------- diff --git a/class-lifterlms.php b/class-lifterlms.php index f8d65cc4e0..d61f22f860 100644 --- a/class-lifterlms.php +++ b/class-lifterlms.php @@ -34,7 +34,7 @@ final class LifterLMS { * * @var string */ - public $version = '5.4.0'; + public $version = '5.4.1'; /** * LLMS_Assets instance diff --git a/includes/abstracts/abstract.llms.post.model.php b/includes/abstracts/abstract.llms.post.model.php index e644ed83ad..14fddcc6a6 100755 --- a/includes/abstracts/abstract.llms.post.model.php +++ b/includes/abstracts/abstract.llms.post.model.php @@ -5,7 +5,7 @@ * @package LifterLMS/Abstracts/Classes * * @since 3.0.0 - * @version [version] + * @version 5.4.1 */ defined( 'ABSPATH' ) || exit; @@ -952,7 +952,7 @@ public function get_properties() { /** * Get the properties that will be used to generate the array representation of the model. * - * @since [version] + * @since 5.4.1 * * @return string[] Array of property keys to be used by {@see toArray}. */ @@ -1009,7 +1009,7 @@ protected function get_to_array_properties() { * This stub can be overloaded by an extending class and the property list is filterable via the * {@see llms_get_{$this->model_post_type}_excluded_to_array_properties} filter. * - * @since [version] + * @since 5.4.1 * * @return string[] */ @@ -1449,7 +1449,7 @@ public function set_terms( $terms, $tax, $append = false ) { * @since 3.17.0 Unknown. * @since 4.7.0 Add exporting of extra data (images and blocks). * @since 4.8.0 Exclude extra data by default. Added `llms_post_model_to_array_add_extras` filter. - * @since [version] Load properties to be used to generate the array from the new `get_to_array_properties()` method. + * @since 5.4.1 Load properties to be used to generate the array from the new `get_to_array_properties()` method. * * @return array */ diff --git a/includes/forms/class-llms-form-handler.php b/includes/forms/class-llms-form-handler.php index 71c79004cf..fc8f08c32c 100644 --- a/includes/forms/class-llms-form-handler.php +++ b/includes/forms/class-llms-form-handler.php @@ -5,7 +5,7 @@ * @package LifterLMS/Classes * * @since 5.0.0 - * @version [version] + * @version 5.4.1 */ defined( 'ABSPATH' ) || exit; @@ -340,7 +340,7 @@ public function submit( $posted_data, $location, $args = array() ) { * * @since 5.0.0 * @since 5.1.0 Added "lifterlms_user_${action}_required_data" filter, to filter the required fields validity of the form submission. - * @since [version] Sanitize filed only after validation. See https://github.com/gocodebox/lifterlms/issues/1829. + * @since 5.4.1 Sanitize filed only after validation. See https://github.com/gocodebox/lifterlms/issues/1829. * * @param array $posted_data User-submitted form data. * @param string $location Form location ID. diff --git a/includes/forms/class-llms-forms-dynamic-fields.php b/includes/forms/class-llms-forms-dynamic-fields.php index 14454184b6..79d8188e31 100644 --- a/includes/forms/class-llms-forms-dynamic-fields.php +++ b/includes/forms/class-llms-forms-dynamic-fields.php @@ -250,7 +250,7 @@ public function modify_account_form( $blocks, $location ) { * Maybe add the required email and password block to a form. * * @since 5.1.0 - * @since [version] Make sure added reusable blocks contain the actual required field, + * @since 5.4.1 Make sure added reusable blocks contain the actual required field, * otherwise fall back on the dynamically generated ones. * * @param array[] $blocks Array of parsed WP_Block arrays. @@ -286,7 +286,7 @@ public function maybe_add_required_block_fields( $blocks, $location, $args ) { /** * Add required block fields. * - * @since [version] + * @since 5.4.1 * * @param string[] $fields_to_require Array of field ids to require. * @param array[] $blocks Array of parsed WP_Block arrays to add required fields to. diff --git a/includes/models/model.llms.course.php b/includes/models/model.llms.course.php index 6c2013626d..436ae68520 100644 --- a/includes/models/model.llms.course.php +++ b/includes/models/model.llms.course.php @@ -5,7 +5,7 @@ * @package LifterLMS/Models/Classes * * @since 1.0.0 - * @version [version] + * @version 5.4.1 */ defined( 'ABSPATH' ) || exit; @@ -462,7 +462,7 @@ public function get_tags( $args = array() ) { * This stub can be overloaded by an extending class and the property list is filterable via the * {@see llms_get_{$this->model_post_type}_excluded_to_array_properties} filter. * - * @since [version] + * @since 5.4.1 * * @return string[] */ @@ -484,7 +484,7 @@ protected function get_to_array_excluded_properties() { * * @example `add_filter( 'llms_course_to_array_disable_prop_exclusion', '__return_true' );` * - * @since [version] + * @since 5.4.1 * * @param boolean $disable Whether or not to disable property exclusions. */ diff --git a/languages/lifterlms.pot b/languages/lifterlms.pot index 4301128e1a..dd25f4bed0 100644 --- a/languages/lifterlms.pot +++ b/languages/lifterlms.pot @@ -2,14 +2,14 @@ # This file is distributed under the GPLv3. msgid "" msgstr "" -"Project-Id-Version: LifterLMS 5.4.0\n" +"Project-Id-Version: LifterLMS 5.4.1\n" "Report-Msgid-Bugs-To: https://lifterlms.com/my-account/my-tickets\n" "Last-Translator: Team LifterLMS \n" "Language-Team: Team LifterLMS \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2021-10-14T11:16:36-06:00\n" +"POT-Creation-Date: 2021-10-26T16:18:07-06:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: llms-dev 1.0.0\n" "X-Domain: lifterlms\n" @@ -176,15 +176,15 @@ msgstr "" msgid "An unknown error occurred during post cloning. Please try again." msgstr "" -#: includes/abstracts/abstract.llms.post.model.php:1225 +#: includes/abstracts/abstract.llms.post.model.php:1293 msgid "Empty data" msgstr "" -#: includes/abstracts/abstract.llms.post.model.php:1310 +#: includes/abstracts/abstract.llms.post.model.php:1378 msgid "Invalid data" msgstr "" -#: includes/abstracts/abstract.llms.post.model.php:1339 +#: includes/abstracts/abstract.llms.post.model.php:1407 msgid "Cannot insert/update the %s meta" msgstr "" @@ -7639,7 +7639,7 @@ msgctxt "Cancel password or email address change button text" msgid "Cancel" msgstr "" -#: includes/forms/class-llms-forms-dynamic-fields.php:541 +#: includes/forms/class-llms-forms-dynamic-fields.php:570 msgid "Current %s" msgstr "" diff --git a/lifterlms.php b/lifterlms.php index 2d61defdb3..4efadb1474 100644 --- a/lifterlms.php +++ b/lifterlms.php @@ -10,7 +10,7 @@ * Plugin Name: LifterLMS * Plugin URI: https://lifterlms.com/ * Description: LifterLMS is a powerful WordPress learning management system plugin that makes it easy to create, sell, and protect engaging online courses and training based membership websites. - * Version: 5.4.0 + * Version: 5.4.1 * Author: LifterLMS * Author URI: https://lifterlms.com/ * Text Domain: lifterlms diff --git a/package-lock.json b/package-lock.json index ff963e4468..b67db3122a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "lifterlms", - "version": "5.4.0", + "version": "5.4.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "lifterlms", - "version": "5.4.0", + "version": "5.4.1", "license": "GPL-3.0", "devDependencies": { "@babel/cli": "^7.8.4", diff --git a/package.json b/package.json index 48e6a6e6e5..b059ae2b4d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lifterlms", - "version": "5.4.0", + "version": "5.4.1", "description": "LifterLMS by codeBOX", "repository": { "type": "git", diff --git a/readme.txt b/readme.txt index 74c22e1627..ca2b5da87b 100644 --- a/readme.txt +++ b/readme.txt @@ -7,7 +7,7 @@ License URI: https://www.gnu.org/licenses/gpl-3.0.html Requires at least: 5.4 Tested up to: 5.8 Requires PHP: 7.3 -Stable tag: 5.4.0 +Stable tag: 5.4.1 LifterLMS is a powerful WordPress learning management system plugin that makes it easy to create, sell, and protect engaging online courses and training based membership websites. @@ -537,6 +537,15 @@ You can review our full security policy at [https://lifterlms.com/security-polic == Changelog == += v5.4.1 - 2021-10-26 = + +##### Bug fixes + ++ Exclude internal-use-only properties (related to reporting caches and student counts) when exporting or cloning courses. [#1532](https://github.com/gocodebox/lifterlms/issues/1532) ++ Don't sanitize input from user forms until validation has succeeded. [#1829](https://github.com/gocodebox/lifterlms/issues/1829.) ++ Fixed an issue encountered when fields are removed from reusable blocks, causing some user forms from functioning as expected. [#1832](https://github.com/gocodebox/lifterlms/issues/1832) + + = v5.4.0 - 2021-10-14 = ##### Updates @@ -698,10 +707,4 @@ You can review our full security policy at [https://lifterlms.com/security-polic + Fix: Corrected typos in error messages encountered during password reset. -= v5.1.1 - 2021-07-26 = - -+ Bugfix: Fixed a bug causing malformed character codes to be rendered in forms when installing forms with translated labels. -+ [LifterLMS Helper version 3.3.1](https://make.lifterlms.com/2021/07/26/lifterlms-helper-version-3-3-1/) - - [Read the full changelog](https://make.lifterlms.com/tag/lifterlms/) diff --git a/tests/phpunit/unit-tests/abstracts/class-llms-test-abstract-post-model.php b/tests/phpunit/unit-tests/abstracts/class-llms-test-abstract-post-model.php index 4b9b7faed9..e629f77492 100644 --- a/tests/phpunit/unit-tests/abstracts/class-llms-test-abstract-post-model.php +++ b/tests/phpunit/unit-tests/abstracts/class-llms-test-abstract-post-model.php @@ -155,7 +155,7 @@ public function test_set_bulk_quotes() { /** * Test toArray() method. * - * @since [version] + * @since 5.4.1 * * @return void */ @@ -194,7 +194,7 @@ public function test_toArray() { /** * Test toArray() method when the author is expanded. * - * @since [version] + * @since 5.4.1 * * @return void */ diff --git a/tests/phpunit/unit-tests/forms/class-llms-test-form-handler.php b/tests/phpunit/unit-tests/forms/class-llms-test-form-handler.php index cc1cd2004d..f178ad5b9a 100644 --- a/tests/phpunit/unit-tests/forms/class-llms-test-form-handler.php +++ b/tests/phpunit/unit-tests/forms/class-llms-test-form-handler.php @@ -8,7 +8,7 @@ * @group form_handler * * @since 5.0.0 - * @version [version] + * @version 5.4.1 */ class LLMS_Test_Form_Handler extends LLMS_UnitTestCase { @@ -509,7 +509,7 @@ public function test_submit_success_with_voucher() { /** * Tests that submitting a invalid email address produces an error. * - * @since [version] + * @since 5.4.1 * * @return void */ diff --git a/tests/phpunit/unit-tests/forms/class-llms-test-forms-dynamic-fields.php b/tests/phpunit/unit-tests/forms/class-llms-test-forms-dynamic-fields.php index 1d487975b0..34feece945 100644 --- a/tests/phpunit/unit-tests/forms/class-llms-test-forms-dynamic-fields.php +++ b/tests/phpunit/unit-tests/forms/class-llms-test-forms-dynamic-fields.php @@ -8,7 +8,7 @@ * @group forms_dynamic_fields * * @since 5.0.0 - * @version [version] + * @version 5.4.1 */ class LLMS_Test_Forms_Dynamic_fields extends LLMS_UnitTestCase { @@ -587,7 +587,7 @@ public function test_remove_block() { /** * Test required fields are still added if their reusable blocks exist but do not contain them. * - * @since [version] + * @since 5.4.1 * * @return void */ diff --git a/tests/phpunit/unit-tests/functions/class-llms-test-functions-user-postmeta.php b/tests/phpunit/unit-tests/functions/class-llms-test-functions-user-postmeta.php index a2670f2eea..bf05201557 100644 --- a/tests/phpunit/unit-tests/functions/class-llms-test-functions-user-postmeta.php +++ b/tests/phpunit/unit-tests/functions/class-llms-test-functions-user-postmeta.php @@ -10,7 +10,7 @@ * @since 3.21.0 * @since 3.33.0 Add test for the `llms_bulk_delete_user_postmeta` function. * @since 4.5.1 Fix failing `test_delete_user_postmeta()` which was comparing based on array order when that doesn't strictly matter. - * @version [version] + * @version 5.4.1 */ class LLMS_Test_Functions_User_Postmeta extends LLMS_UnitTestCase { @@ -178,7 +178,7 @@ public function test_bulk_delete_user_postmeta() { * * @since 3.21.0 * @since 5.3.2 Add delta when comparing enrollment date with updated date. - * @since [version] Compare dates using UNIX timestamps. + * @since 5.4.1 Compare dates using UNIX timestamps. */ public function test_llms_get_user_postmeta() { diff --git a/tests/phpunit/unit-tests/models/class-llms-test-model-llms-course.php b/tests/phpunit/unit-tests/models/class-llms-test-model-llms-course.php index 53f2bbdb5f..276f177226 100644 --- a/tests/phpunit/unit-tests/models/class-llms-test-model-llms-course.php +++ b/tests/phpunit/unit-tests/models/class-llms-test-model-llms-course.php @@ -583,7 +583,7 @@ public function test_to_array_extra_images() { /** * Test summary get_to_array_excluded_properties() * - * @since [version] + * @since 5.4.1 * * @return void */ @@ -610,7 +610,7 @@ public function test_get_to_array_excluded_properties() { /** * Test toArray to ensure no excluded properties are included. * - * @since [version] + * @since 5.4.1 * * @return void */