Conversation
Contributor
davidpanderson
commented
Jul 8, 2025
- show completion (or abort) time in batch lists
- allow ordering of batch lists by asc/desc submit time or completion time
- show completion (or abort) time in batch lists - allow ordering of batch lists by asc/desc submit time or completion time
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the batch listing page by adding completion/abort timestamps to the tables and enabling users to sort batches by submission or completion time.
- Added order controls (
order_options,order_item,order_clause,get_order) to generate sort links - Updated batch tables (
show_complete,show_aborted) to displaycompletion_time - Modified handlers (
handle_show_status,handle_admin_*,handle_show_all) to apply dynamicORDER BYclauses based on user selection
Comments suppressed due to low confidence (2)
html/user/submit.php:63
- [nitpick] Consider adding a doc comment explaining the purpose and parameters of
order_options,order_item,order_clause, andget_orderfor better maintainability.
function order_options($url_args, $order) {
html/user/submit.php:60
- No automated tests were added to cover the new sorting UI and SQL ordering logic; consider adding unit or functional tests to verify each
orderoption.
// sub_asc, sub_desc: submission time ( = ID order)
| return $label; | ||
| } else { | ||
| $url .= "&order=$order"; | ||
| return "<a href=$url>$label</a>"; |
There was a problem hiding this comment.
Wrap the href value in quotes and escape the URL (e.g. htmlspecialchars()) to avoid malformed HTML and potential XSS vulnerabilities.
| } | ||
| } | ||
|
|
||
| function order_clause($order) { |
There was a problem hiding this comment.
Add a default case or fallback return value in order_clause to guard against unexpected order inputs, preventing invalid SQL syntax.
AenBleidd
approved these changes
Jul 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.