Skip to content

Re-align WWW_Users and UserSettings - #1016

Merged
timschofield merged 2 commits into
timschofield:masterfrom
dalers:fix/user-settings
Sep 18, 2026
Merged

timschofield merged 2 commits into
timschofield:masterfrom
dalers:fix/user-settings

Conversation

@dalers

@dalers dalers commented Sep 18, 2026 •

Copy link
Copy Markdown
Collaborator

Let's try this again. This PR resolves #1013 by re-aligning WWW_Users and UserSettings, and in the process replace the PageSize used in WWW_Users.php (7 near-identical if/else blocks and 14 echo statements) with a $PageSizes value→label array and foreach loop, and use the same pattern in UserSettings.php. The result is 70% less code per file and adding/removing a page size now only requires editing one array entry instead of duplicating an if/else block. This implementation was suggested by @timschofield in a comment to the original and now abandoned PR #1015 ("Would it be more efficient to store the page sizes in an array, and then create the options by cycling through the array?")

@timschofield
timschofield merged commit 0ba6fcb into timschofield:master Sep 18, 2026
4 checks passed
@dalers
dalers deleted the fix/user-settings branch September 18, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WWW_Users and UserSettings are not aligned

2 participants