-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Level Deletion Confirmation and Bug Fixes #512
Conversation
* Added deletion confirmation dialog when deleting levels. * Level data is now deleted from HintLog, ScoresLog, and FailuresLog, when a level is deleted. * Cache invalidation performed on level deletion for records containing levels.
This PR is now mergeable. Given rebase conflicts: the branch was reset (hard) to the upstream dev branch, and then the PR changes were patched and merged onto dev, submitted via a (force) push. All relevant commit log data has been retained in the final commit message. |
src/models/Level.php
Outdated
await $db->queryf('DELETE FROM levels WHERE id = %d LIMIT 1', $level_id); | ||
await $db->queryf('DELETE FROM hints_log WHERE level_id = %d', $level_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember to try and combine awaits together with something like \HH\Asio\va
You can do that for loops too by putting the Awaitables
in an array.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved all awaitable queries into a vector which are now executed via AsyncMysqlConnection::multiQuery().
…AsyncMysqlConnection::multiQuery().
Updated based on feedback. |
The use of But since these queries only use |
Merge of `dev` into `master` Commits: * Registration enforcing strong passwords (#442) (ac64f55) * Custom branding for icon and text (#448) (081062c) * Merge of /master into /dev - Baseline for Development (#509) (25c1748) * Updated Language Translations (#511) (b9f031e) * Auto Announcements and Activity Log Expansion (#513) (323ba05) * Level Import Fix (#514) (dc7c87c) * Announcements Controls Rename (#515) (c5da9f7) * Set Default Scoring Cache Values (#516) (ec996a5) * Unique Logos Per Team # (#517) (6d4f919) * Custom Branding Update (#518) (ea78f6a) * Backup and Restore settings.ini on Tests (#519) (eb4a5b5) * Maintain Team Protection on Database Reset (#520) (5d91ae9) * Fixed Login Form JS Bug (Fixes: #521) (#523) (2b1474b) * Level Deletion Confirmation and Bug Fixes (#512) (4a7b5b5) * Provision Streamlined, Quick Setup Added, and Multiple Containers Support (#535) (b487fc1) * Merge branch 'dev' into WraySec/fbctf/merge@7f8c281
* Level Deletion Confirmation and Bug Fixes * Added deletion confirmation dialog when deleting levels. * Level data is now deleted from HintLog, ScoresLog, and FailuresLog, when a level is deleted. * Cache invalidation performed on level deletion for records containing levels. * Moved all awaitable queries into a vector which are now executed via AsyncMysqlConnection::multiQuery().
Added deletion confirmation dialog when deleting levels.
Level data is now deleted from HintLog, ScoresLog, and FailuresLog, when a level is deleted.
Cache invalidation performed on level deletion for records containing levels.